Bug 50116 - [4.6 Regression] internal compiler error: in decode_addr_const, at varasm.c:2632
Summary: [4.6 Regression] internal compiler error: in decode_addr_const, at varasm.c:2632
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.6.1
: P3 normal
Target Milestone: 4.6.2
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-18 09:56 UTC by Loïc Minier
Modified: 2011-09-01 15:16 UTC (History)
2 users (show)

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-08-26 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Loïc Minier 2011-08-18 09:56:41 UTC
Hi

This was initially reported at https://bugs.launchpad.net/ubuntu/+source/gcc-4.6-armel-cross/+bug/827990 and Michael Hope produced a reduced testcase which is confirmed to affect GCC 4.6.1.

arm-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0x80100000 -DCONFIG_SPL_TEXT_BASE=0x40304350 -I/home/lool/git/linaro/boot/u-boot-linaro-stable/obj-omap4_panda/include2 -I/home/lool/git/linaro/boot/u-boot-linaro-stable/obj-omap4_panda/include -I/home/lool/git/linaro/boot/u-boot-linaro-stable/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6.1/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral -Wno-format-security -o /home/lool/git/linaro/boot/u-boot-linaro-stable/obj-omap4_panda/arch/arm/cpu/armv7/omap4/clocks.o clocks.c -c
clocks.c: In function ‘enable_basic_clocks’:
clocks.c:657:13: internal compiler error: in decode_addr_const, at varasm.c:2632
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.

Michael Hope also notes:
"Note the use of -fno-builtin to suppress a warning.

The fault occurs at -Os, -O1, -O2, and -O3. The work-around is to compile at -O0."

(I'm attaching his reduced test case, the original files are in the Launchpad bug in the unlikely case you'd need them)

Bye,
Comment 1 Richard Biener 2011-08-26 20:52:36 UTC
Mine.
Comment 2 Richard Biener 2011-08-29 08:03:45 UTC
Author: rguenth
Date: Mon Aug 29 08:03:34 2011
New Revision: 178155

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178155
Log:
2011-08-29  Richard Guenther  <rguenther@suse.de>

        PR middle-end/50116
	* varasm.c (decode_addr_const): Handle MEM_REF[&X, OFF].

Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/varasm.c
Comment 3 Richard Biener 2011-08-29 08:04:08 UTC
Should be fixed now.
Comment 4 bero 2011-09-01 15:16:58 UTC
The patch doesn't fix it.
I don't have sufficient access to reopen this bug, so I've filed a new bug including a reduced test case as bug 50266.