public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant
@ 2008-05-26 19:23 hutchinsonandy at aim dot com
2008-05-26 19:25 ` [Bug c/36336] " hutchinsonandy at aim dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hutchinsonandy at aim dot com @ 2008-05-26 19:23 UTC (permalink / raw)
To: gcc-bugs
The follow ICE occurs with various testsuite tests. It appears to be real bug.
Executing on host: /home/hutchia/Desktop/awhconf/gcc/xgcc
-B/home/hutchia/Desktop/awhconf/gcc/ -O2 -w -DSTACK_SIZE=2048
-DNO_TRAMPOLINES -fno-show-column -c -DSIGNAL_SUPPRESS -mmcu=atmega128 -o
980408-1.o
/home/hutchia/Desktop/gcc/gcc/testsuite/gcc.c-torture/compile/980408-1.c
(timeout = 300)
/home/hutchia/Desktop/gcc/gcc/testsuite/gcc.c-torture/compile/980408-1.c: In
function 'MinifyImage':
/home/hutchia/Desktop/gcc/gcc/testsuite/gcc.c-torture/compile/980408-1.c:129:
internal compiler error: in push_reload, at reload.c:940
The assertion failure is due to push_reload receiving pseudo (e.g. p68) that
has not replaced with its reg_equiv_constant.
The assert was added by this bug fix:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34641
Analysis
push_reload is called by target LEGITIMIZE_RELOAD_ADDRESS. This received
operand p68 + 2 and is attempting to reload p68.
LEGITIMIZE_RELOAD_ADDRESS was invoked by find_reloads_address after
strict_memory_address_p rejects p68+2.
The assert was added
2008-01-10 Andreas Krebbel <krebbel1@de.ibm.com>
This also added extra code to convert pseudo register equivalent constants were
converted by before push_reload is called. However, it does not consider the
case where the operand is a sum of reg_equiv_reg and constant.
This does not get replaced before LEGITIMIZE_RELOAD_ADDRESS is called in
find_reloads_address.
The internals manual clearly indicates that GO_IF_LEGITIMATE_ADDRESS should
reject p68+2 unless there is const wrapper.
http://gcc.gnu.org/onlinedocs/gccint/Addressing-Modes.html
But the call from reload does not seem to provide that wrapper. Perhaps this is
the bug?
I have attached the smallest testcase. It is nonsense but will cause failure
when compiled using:
avr-gcc -c -mmcu=atmega128 -w -O1 -mmcu=atmega128 -std=gnu99 memcpy-chk.c -o
memcpy-chk.o
The attached testcase uses __builtin_setjmp as a reduction from a failing test.
However, the ICE is not unique to this function.
gcc/gcc/testsuite/gcc.c-torture/compile/980408-1.c also fails and this does not
use _builtin_setjmp. But I was unable to create small testcase from this.
--
Summary: ICE push_reload - psuedo reg_equiv_constant
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hutchinsonandy at aim dot com
GCC build triplet: i686-pc-cygwin
GCC host triplet: i686-pc-cygwin
GCC target triplet: avr-unknown-none
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c/36336] ICE push_reload - psuedo reg_equiv_constant
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
@ 2008-05-26 19:25 ` hutchinsonandy at aim dot com
2008-06-06 19:25 ` [Bug target/36336] " eric dot weddington at atmel dot com
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hutchinsonandy at aim dot com @ 2008-05-26 19:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from hutchinsonandy at aim dot com 2008-05-26 19:24 -------
Created an attachment (id=15688)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15688&action=view)
Testcase
Testcase derived from gcc testsuite failure memcpy-chk.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
2008-05-26 19:25 ` [Bug c/36336] " hutchinsonandy at aim dot com
@ 2008-06-06 19:25 ` eric dot weddington at atmel dot com
2008-06-06 19:43 ` hutchinsonandy at aim dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: eric dot weddington at atmel dot com @ 2008-06-06 19:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from eric dot weddington at atmel dot com 2008-06-06 19:24 -------
Andy, I'm having a difficulty in trying to reproduce this bug. I use this
command line:
avr-gcc -O1 -mmcu=atmega128 -w -std=gnu99 -c memcpy-chk.c -o memcpy-chk.o
But I'm using WinAVR 20080512, which is patched, and it does not give an ICE.
Are you also getting this ICE with HEAD?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
2008-05-26 19:25 ` [Bug c/36336] " hutchinsonandy at aim dot com
2008-06-06 19:25 ` [Bug target/36336] " eric dot weddington at atmel dot com
@ 2008-06-06 19:43 ` hutchinsonandy at aim dot com
2008-06-06 19:49 ` eric dot weddington at atmel dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hutchinsonandy at aim dot com @ 2008-06-06 19:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hutchinsonandy at aim dot com 2008-06-06 19:42 -------
Subject: Re: ICE push_reload - psuedo reg_equiv_constant
O2
----------------------------------------------
Sent from my Dingleberry wired device.
-----Original Message-----
From: eric dot weddington at atmel dot com <gcc-bugzilla@gcc.gnu.org>
To: hutchinsonandy@aim.com
Sent: Fri, 6 Jun 2008 3:24 pm
Subject: [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
------- Comment #2 from eric dot weddington at atmel dot com
2008-06-06 19:24
-------
Andy, I'm having a difficulty in trying to reproduce this bug. I use
this
command line:
avr-gcc -O1 -mmcu=atmega128 -w -std=gnu99 -c memcpy-chk.c -o
memcpy-chk.o
But I'm using WinAVR 20080512, which is patched, and it does not give
an ICE.
Are you also getting this ICE with HEAD?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
` (2 preceding siblings ...)
2008-06-06 19:43 ` hutchinsonandy at aim dot com
@ 2008-06-06 19:49 ` eric dot weddington at atmel dot com
2008-06-06 20:19 ` hutchinsonandy at aim dot com
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: eric dot weddington at atmel dot com @ 2008-06-06 19:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from eric dot weddington at atmel dot com 2008-06-06 19:48 -------
Test case passes with -O[0123s], with WinAVR 20080512 (patched 4.3.0).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
` (3 preceding siblings ...)
2008-06-06 19:49 ` eric dot weddington at atmel dot com
@ 2008-06-06 20:19 ` hutchinsonandy at aim dot com
2008-06-15 18:26 ` hutchinsonandy at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hutchinsonandy at aim dot com @ 2008-06-06 20:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from hutchinsonandy at aim dot com 2008-06-06 20:18 -------
Subject: Re: ICE push_reload - psuedo reg_equiv_constant
The patch for
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31786
removes one problematic part of LEGITIMIZE_RELOAD_ADDRESS. This is
applied to WinAVR 20080512 (patched 4.3.0). But is still waiting for
approval on avr-gcc 4.3/4.4 HEAD.
Even with that patch, the other parts of L_R_A are bad and need fixing
with added check of reg_equivalent_constant.
So if register is equivalent constant LEGITIMIZE_RELOAD_ADDRESS should
do nothing.
The assert that triggers is an explicit check for this.
I have not posted patch due to overlap with pending patch.
BTW gcc list has short discussion on this bug, including explanation
for the AVR code.
Andy
----------------------------------------------
Sent from my Dingleberry wired device.
-----Original Message-----
From: eric dot weddington at atmel dot com <gcc-bugzilla@gcc.gnu.org>
To: hutchinsonandy@aim.com
Sent: Fri, 6 Jun 2008 3:48 pm
Subject: [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
------- Comment #4 from eric dot weddington at atmel dot com
2008-06-06 19:48
-------
Test case passes with -O[0123s], with WinAVR 20080512 (patched 4.3.0).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
` (4 preceding siblings ...)
2008-06-06 20:19 ` hutchinsonandy at aim dot com
@ 2008-06-15 18:26 ` hutchinsonandy at gcc dot gnu dot org
2008-06-15 18:36 ` hutchinsonandy at gcc dot gnu dot org
2008-06-15 18:37 ` hutchinsonandy at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: hutchinsonandy at gcc dot gnu dot org @ 2008-06-15 18:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hutchinsonandy at gcc dot gnu dot org 2008-06-15 18:25 -------
Subject: Bug 36336
Author: hutchinsonandy
Date: Sun Jun 15 18:24:27 2008
New Revision: 136818
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136818
Log:
PR target/36336
* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Add check for
reg_equiv_constant.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
` (5 preceding siblings ...)
2008-06-15 18:26 ` hutchinsonandy at gcc dot gnu dot org
@ 2008-06-15 18:36 ` hutchinsonandy at gcc dot gnu dot org
2008-06-15 18:37 ` hutchinsonandy at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: hutchinsonandy at gcc dot gnu dot org @ 2008-06-15 18:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hutchinsonandy at gcc dot gnu dot org 2008-06-15 18:35 -------
Subject: Bug 36336
Author: hutchinsonandy
Date: Sun Jun 15 18:34:45 2008
New Revision: 136819
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136819
Log:
PR target/36336
* config/avr/avr.h (LEGITIMIZE_RELOAD_ADDRESS): Add check for
reg_equiv_constant.
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/config/avr/avr.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/36336] ICE push_reload - psuedo reg_equiv_constant
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
` (6 preceding siblings ...)
2008-06-15 18:36 ` hutchinsonandy at gcc dot gnu dot org
@ 2008-06-15 18:37 ` hutchinsonandy at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: hutchinsonandy at gcc dot gnu dot org @ 2008-06-15 18:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from hutchinsonandy at gcc dot gnu dot org 2008-06-15 18:36 -------
Fixed 4.4 and 4.3
--
hutchinsonandy at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36336
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-06-15 18:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-26 19:23 [Bug c/36336] New: ICE push_reload - psuedo reg_equiv_constant hutchinsonandy at aim dot com
2008-05-26 19:25 ` [Bug c/36336] " hutchinsonandy at aim dot com
2008-06-06 19:25 ` [Bug target/36336] " eric dot weddington at atmel dot com
2008-06-06 19:43 ` hutchinsonandy at aim dot com
2008-06-06 19:49 ` eric dot weddington at atmel dot com
2008-06-06 20:19 ` hutchinsonandy at aim dot com
2008-06-15 18:26 ` hutchinsonandy at gcc dot gnu dot org
2008-06-15 18:36 ` hutchinsonandy at gcc dot gnu dot org
2008-06-15 18:37 ` hutchinsonandy at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).