bugGNU Development Chain for 68HC11/68HC12 - Bugs: bug #16851, Internal compiler error with...

 
 

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

bug #16851: Internal compiler error with -fomit-frame-pointer

Submitted by:  John Polstra <jdpolstra>
Submitted on:  Thu 15 Jun 2006 06:29:33 PM UTC  
Votes:  20  
 
Category: gccSeverity: 3 - Normal
Item Group: sw-bugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Thu 02 Nov 2006 10:33:10 PM UTC, comment #1:

adding -fno-defer-pop in addition to -O and -fomit-frame-pointer seems to prevent the error without much sacrifice in performance.

Also the following patch seems to remove the error,
I only need to mask out indirect addressing on the second run
of the function, but it's possible my test cases are not complex
enough, it also works if indirect addressing is always
masked out, but it generates more assembly instructions to
do the same thing.

--- gcc-3.3.5/gcc/config/m68hc11/m68hc11.c 2006-11-02 15:24:29.000000000 -0700
+++ gcc/gcc-3.3.5/gcc/config/m68hc11/m68hc11.c 2006-11-02 15:17:07.000000000 -0700
@@ -743,11 +744,19 @@

return 1;
}
- addr_mode = m68hc11_addr_mode | (strict ? ADDR_STRICT : 0);
- if (register_indirect_p (operand, mode, addr_mode))
- {
+
+ int mask = 0;
+ static int c;
+
+ if(c++==1)
+ mask = ADDR_INDIRECT;
+ addr_mode = (m68hc11_addr_mode & ~mask) | (strict ? ADDR_STRICT : 0);
+
+ if (register_indirect_p (operand, mode, addr_mode))
+ {
return 1;
}
+
if (PUSH_POP_ADDRESS_P (operand))
{
return 1;

Sean D Epagnier <sdepagnier>
Thu 15 Jun 2006 06:29:33 PM UTC, original submission:

Version: m6812-elf-gcc (GCC) 3.3.6-m68hc1x-20060122

If the attached file "test.cpp" is compiled with this command:

m6812-elf-gcc -m68hc12 -mshort -O -fomit-frame-pointer -S test.cpp

the compilation fails with this message:

test.cpp:15: internal compiler error: in choose_reload_regs, at reload1.c:5901

Using stock gcc-3.3.6, this failure does not occur.

Here are some other changes that make the failure go away:

- eliminate -fomit-frame-pointer
- eliminate -O
- eliminate -mshort
- change -m68hc12 to -m68hc11

John Polstra <jdpolstra>

 

Attached Files
file #10198:  test.cpp added by jdpolstra (122B - application/octet-stream - Test case)

 

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 20 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 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 02 Nov 2006 10:33:10 PM UTCsdepagnierCarbon-Copy-=>Added sdepagnier
Thu 15 Jun 2006 06:29:33 PM UTCjdpolstraAttached File-=>Added test.cpp, #10198

Back to the top


Powered by Savane 3.1-cleanup