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: gccSeverity: 5 - Blocker
Item Group: sw-bugStatus: Fixed
Privacy: PublicAssigned 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 click here to 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
Sun 12 Jun 2005 10:02:25 AM UTCciceronOpen/ClosedOpen=>Closed
Sun 12 Jun 2005 09:59:29 AM UTCciceronStatusIn Progress=>Fixed
Sun 17 Apr 2005 02:14:41 PM UTCflavioCarbon-Copy-=>Added flavio
Tue 05 Apr 2005 09:10:52 PM UTCciceronSeverity3 - Normal=>5 - Blocker
Sun 03 Apr 2005 10:09:19 AM UTCciceronStatusNone=>In Progress
  Assigned toNone=>ciceron
Sat 12 Mar 2005 11:07:32 PM UTCNoneAttached File-=>Added lsqrt.c, #2299

Back to the top


Powered by Savane 3.1-cleanup1