bugGNU Development Chain for 68HC11/68HC12 - Bugs: bug #12297, -fomit-frame-pointer and -Os...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #12297: -fomit-frame-pointer and -Os generate wrong code on the HCS12

Submitted by:  None
Submitted on:  Sat 12 Mar 2005 11:07:32 PM UTC  
 
Category:  gcc Severity:  5 - Blocker
Item Group:  sw-bug Status:  Fixed
Privacy:  Public Assigned to:  Stephane Carrez <ciceron>
Open/Closed:  Closed

Sun 12 Jun 2005 09:59:29 AM UTC, comment #4:

Fixed in 3.0.1

Stephane Carrez <ciceron>
Project AdministratorIn charge of this item.
Tue 05 Apr 2005 09:10:52 PM UTC, comment #3:

I suspect the BB fix is necessary for 4.0 and 4.1
and this is blocking for 4.1 (compiler crash).

Stephane Carrez <ciceron>
Project AdministratorIn charge of this item.
Sun 03 Apr 2005 06:50:13 PM UTC, comment #2:

The problem was due to the Z register replacement pass.
When we add the "save Z register" instruction at end of
a replacement block, it can happen that the insn is
added in the next basic block (the insn is in the correct
place, but not in the good basic block). Later, when
the register life analysis is made, because the last save Z
register instruction is not in the good basic block
gcc thinks that the register is dead which is not true
(because it's used in the next basic block).

Workarround: use -ffixed-z

Will be fixed in 3.0.1

Stephane Carrez <ciceron>
Project AdministratorIn charge of this item.
Sun 03 Apr 2005 10:09:19 AM UTC, comment #1:

Confirmed as a bug.

Added a test case in gcc testsuite.

Stephane Carrez <ciceron>
Project AdministratorIn charge of this item.
Sat 12 Mar 2005 11:07:32 PM UTC, original submission:

The attached lsqrt function (also provided with GEL) returns 32767 if compiled with -Os and -fomit-frame-pointer. Removing either one of the switches fixes the bug.

To reproduce, compile with

m6811-elf-gcc -fomit-frame-pointer -Wall -mshort -m68hcs12 -Os -g lsqrt.c -o lsqrt

Anonymous

 

Attached Files
file #2721:  lsqrt.c added by None (579B - application/octet-stream - Test case (lsqrt function))

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-06-12 ciceron Open/ClosedOpen => Closed
2005-06-12 ciceron StatusIn Progress => Fixed
2005-04-17 flavio Carbon-Copy- => Added flavio
2005-04-05 ciceron Severity3 - Normal => 5 - Blocker
2005-04-03 ciceron StatusNone => In Progress
    Assigned toNone => ciceron
2005-03-12 None Attached File- => Added lsqrt.c, #2299

Back to the top


Powered by Savane 3.3