New: ICE in simplify_subreg, at simplify-rtx.c:4466
15 answers - 765 bytes -

[ forwarded from http://bugs.debian.org/373820 ]
We're seeing the following ICE, both with gcc 4.1 and latest 4.2 (but 4.0
works). Apparently it only happens on x86_64. It works when you drop the
optimization flag.
(sid)75:tbm@usurper: ~/delta/bin] /usr/lib/gcc-snapshot/bin/gcc -c mini.m
mini.m: In function '-[CynthiuneHeaderCell
_drawASize:atReferencePoint:]':
mini.m:75: internal compiler error: in simplify_subreg, at simplify-rtx.c:4466
Please submit a full bug report,
with preprocessed source if appropriate.
See <for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <>.
zsh: exit 1 /usr/lib/gcc-snapshot/bin/gcc -c mini.m
(sid)76:tbm@usurper: ~/delta/bin]
No.1 | | 214 bytes |
| 
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
CC| |pinskia at gcc dot gnu dot
| |org
Component|objc |rtl-optimization
Target Milestone| |4.1.2
No.2 | | 102 bytes |
| 
Comment #2 from pinskia at gcc dot gnu dot org 2006-06-17 01:35
This worked with "4.2.0 20060507".
No.3 | | 136 bytes |
| 
Comment #3 from pinskia at gcc dot gnu dot org 2006-06-17 01:50
It works in 4.2.0 for sure. It does fail in "4.1.2 20060608" though.
No.4 | | 1057 bytes |
| 
Comment #4 from pinskia at gcc dot gnu dot org 2006-06-17 02:07
The backtrace:
#0 fancy_abort (file=0xa6b580
"/", line=3807,
function=0xa6c3f0 "simplify_subreg")
at /
#1 0x00000000007fa7e6 in simplify_subreg (outermode=SFmode, op=0x2aaaaae02400,
innermode=VIDmode, byte=0)
at /
#2 0x00000000008ec95a in make_compound_operation (x=0x2aaaaaf80640,
in_code=MEM) at /
#3 0x00000000008eca86 in make_compound_operation (x=0x2aaaaaf80660,
in_code=SET) at /
#4 0x00000000008e9138 in simplify_set (x=0x2aaaaaf80680) at
/
#5 0x00000000008e7146 in combine_simplify_rtx (x=0x2aaaaaf80680,
op0_mode=VIDmode, in_dest=0)
at /
#6 0x00000000008e465d in subst (x=0x2aaaaaf80680, from=0x2aaaaaf803c0,
to=0x2aaaaaf85140, in_dest=0, unique_copy=0)
at /
#7 0x00000000008df927 in try_combine (i3=0x2aaaaaf811e0, i2=0x2aaaaaf81190,
i1=0x2aaaaaf81050, )
at /
#8 0x00000000008dc164 in combine_instructions (f=0x2aaaaaf59800, nregs=101) at
/
#9 0x00000000008faec0 in rest_of_handle_combine () at
/
No.5 | | 644 bytes |
| 
Comment #5 from pinskia at gcc dot gnu dot org 2006-06-17 02:21
Here is a C testcase (so that it does not get marked as P5):
typedef struct _NSPoint NSPoint;
struct _NSPoint
{
float x;
float y;
};
static inline NSPoint
NSMakePoint (float x, float y)
{
NSPoint point;
point.x = x;
point.y = y;
return point;
}
static inline NSPoint
RelativePoint (NSPoint point, NSPoint refPoint)
{
return NSMakePoint (refPoint.x + point.x, refPoint.y + point.y);
}
NSPoint g(NSPoint refPoint)
{
float pointA, pointB;
return RelativePoint (NSMakePoint (0, pointA), refPoint);
}
No.6 | | 288 bytes |
| 
Comment #6 from tbm at cyrius dot com 2006-06-17 14:56
(In reply to comment #3)
It works in 4.2.0 for sure.
I don't think that's correct. I can confirm that gcc 4.2 20060508 works, but
20060530 and 20060613 definitely fail here (both the C and C test
cases).
No.7 | | 363 bytes |
| 
Comment #7 from pinskia at gcc dot gnu dot org 2006-06-17 15:00
(In reply to comment #6)
(In reply to comment #3)
It works in 4.2.0 for sure.
I don't think that's correct. I can confirm that gcc 4.2 20060508 works, but
20060530 and 20060613 definitely fail here (both the C and C test
cases).
I works with "4.2.0 20060617".
No.8 | | 531 bytes |
| 
Comment #8 from tbm at cyrius dot com 2006-06-17 16:26
This ICE got introduced with:
r113775 | sayle | 2006-05-15 06:43:05 +0200 (Mon, 15 May 2006) | 13 lines
PR rtl-optimization/22563
Backports from mainline
* expmed.c (store_fixed_bit_field): When using AND and IR to store
a fixed width bitfield, always force the intermediates into pseudos.
Also check whether the bitsize is valid for the machine's "insv"
instruction before moving the target into a pseudo for use with
the insv.
No.9 | | 834 bytes |
| 
Comment #9 from tbm at cyrius dot com 2006-06-18 01:09
(In reply to comment #7)
It works with "4.2.0 20060617".
Hmm.
(sid)46:tbm@usurper: ~/tmp/gcc/4.2/gcc] ./cc1 ~/m.c
NSMakePoint RelativePoint g
Analyzing compilation unitPerforming intraprocedural optimizations
Assembling functions:
g
/home/tbm/m.c: In function g:
/home/tbm/m.c:24: internal compiler error: in simplify_subreg, at
simplify-rtx.c:4466
Please submit a full bug report,
with preprocessed source if appropriate.
See <for instructions.
zsh: exit 4 ./cc1 ~/m.c
(sid)47:tbm@usurper: ~/tmp/gcc/4.2/gcc] ./xgcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /
Thread model: posix
gcc version 4.2.0 20060617 (experimental)
(sid)48:tbm@usurper: ~/tmp/gcc/4.2/gcc]
No.10 | | 234 bytes |
| 
Comment #10 from pinskia at gcc dot gnu dot org 2006-06-18 02:58
You know what I have a fix for an inliner bug in my tree which also fixes this
bug. I am going to test that patch fully and submit it for both 4.1.x and
4.2.x.
No.11 | | 129 bytes |
| 
Comment #11 from pinskia at gcc dot gnu dot org 2006-06-30 05:55
This is hidden on the mainline now by my patch for PR 28075.
No.12 | | 130 bytes |
| 
Comment #12 from pinskia at gcc dot gnu dot org 2006-08-14 14:17
This is now a latent bug on the both 4.1 branch and mainline.
No.13 | | 183 bytes |
| 
Comment #13 from ebotcazou at gcc dot gnu dot org 2006-09-13 08:37
If the ICE has disappeared on both branches, the testcase should be added to
the testsuite and the PR closed.
No.14 | | 302 bytes |
| 
Comment #14 from pinskia at gcc dot gnu dot org 2006-09-13 16:20
(In reply to comment #13)
If the ICE has disappeared on both branches, the testcase should be added to
the testsuite and the PR closed.
But the bug still exists, just was covered up by my tree-inline patches for PR
28075.
No.15 | | 240 bytes |
| 
Comment #15 from ebotcazou at gcc dot gnu dot org 2006-09-13 17:37
But the bug still exists, just was covered up by my tree-inline patches for PR
28075.
Your patch may simply be the fix. If we have no testcase, we have no bug.