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 authentication level.

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

Submitter:  John Polstra <jdpolstra>
Submitted:  Thu 15 Jun 2006 06:29:33 PM UTC
Votes: 20
Category:  gcc Severity:  3 - Normal
Item Group:  sw-bug Status:  None
Privacy:  Public Assigned 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>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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


There are 20 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-11-02 sdepagnier Carbon-Copy- Added sdepagnier
2006-06-15 jdpolstra Attached File- Added test.cpp, #10198

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code