public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap
@ 2012-05-21 11:00 markus at trippelsdorf dot de
2012-05-21 12:39 ` [Bug c/53433] " markus at trippelsdorf dot de
` (33 more replies)
0 siblings, 34 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-21 11:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
Bug #: 53433
Summary: [4.8 Regression] ICE in int_mode_for_mode, at
stor-layout.c:424 during bootstrap
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: markus@trippelsdorf.de
libtool: compile: /var/tmp/gcc_build_dir/./gcc/xgcc
-B/var/tmp/gcc_build_dir/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/
-B/usr/x86_64-pc-linux-gnu/lib/
-isystem /usr/x86_64-pc-linux-gnu/include -isystem
/usr/x86_64-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I..
-I/home/markus/gcc/libstdc++-v3/../libib
erty -I/home/markus/gcc/libstdc++-v3/../include
-I/var/tmp/gcc_build_dir/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
-I/var/tmp/gcc_
build_dir/x86_64-pc-linux-gnu/libstdc++-v3/include
-I/home/markus/gcc/libstdc++-v3/libsupc++ -march=native -O3 -pipe
-DIN_GLIBCPP_V3 -Wno-error -c cp
-demangle.c -fPIC -DPIC -o cp-demangle.o
In file included from /usr/include/string.h:634:0,
from cp-demangle.c:112:
cp-demangle.c: In function ‘d_print_comp.part.9’:
cp-demangle.c:3933:16: internal compiler error: in int_mode_for_mode, at
stor-layout.c:424
&& strncmp (dcl->u.s_name.s, "JArray", 6) == 0)
^
Please submit a full bug report,
with preprocessed source if appropriate
$ cat test.i
d_unqualified_name () {
( {
0;
0 ? : 0 ? : "li" == 0 ? : __builtin_strcmp (0, "li");
}
);
}
% /var/tmp/gcc_build_dir/./gcc/xgcc -B/var/tmp/gcc_build_dir/./gcc/ -Wall
-B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -c -w -O0
test.i
test.i: In function ‘d_unqualified_name’:
test.i:4:9: internal compiler error: in int_mode_for_mode, at stor-layout.c:424
0 ? : 0 ? : "li" == 0 ? : __builtin_strcmp (0, "li");
^
Please submit a full bug report,
with preprocessed source if appropriate
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug c/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
@ 2012-05-21 12:39 ` markus at trippelsdorf dot de
2012-05-21 12:41 ` [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap rguenth at gcc dot gnu.org
` (32 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-21 12:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-05-21 11:07:49 UTC ---
Only happened with bootstrap-lto.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
2012-05-21 12:39 ` [Bug c/53433] " markus at trippelsdorf dot de
@ 2012-05-21 12:41 ` rguenth at gcc dot gnu.org
2012-05-21 12:41 ` markus at trippelsdorf dot de
` (31 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-21 12:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
Component|c |middle-end
Version|unknown |4.8.0
Target Milestone|--- |4.8.0
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-21 11:23:21 UTC ---
Suspect Andrew.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
2012-05-21 12:39 ` [Bug c/53433] " markus at trippelsdorf dot de
2012-05-21 12:41 ` [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap rguenth at gcc dot gnu.org
@ 2012-05-21 12:41 ` markus at trippelsdorf dot de
2012-05-21 12:47 ` rguenth at gcc dot gnu.org
` (30 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-21 12:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #4 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-05-21 11:36:54 UTC ---
(In reply to comment #3)
> Btw, I cannot reproduce it.
Yes, this probably depends on the C-library being used.
I'm running (recent trunk):
# /lib/libc.so.6
GNU C Library development release version 2.15.90, by Roland McGrath et al.
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.7.1 20120423 (prerelease).
Compiled on a Linux 3.4.0 system on 2012-04-29.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (2 preceding siblings ...)
2012-05-21 12:41 ` markus at trippelsdorf dot de
@ 2012-05-21 12:47 ` rguenth at gcc dot gnu.org
2012-05-21 15:25 ` markus at trippelsdorf dot de
` (29 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-05-21 12:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-21 11:25:08 UTC ---
Btw, I cannot reproduce it.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (3 preceding siblings ...)
2012-05-21 12:47 ` rguenth at gcc dot gnu.org
@ 2012-05-21 15:25 ` markus at trippelsdorf dot de
2012-05-22 13:07 ` vincenzo.innocente at cern dot ch
` (28 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-05-21 15:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
Markus Trippelsdorf <markus at trippelsdorf dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #5 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-05-21 15:18:38 UTC ---
Started with revision 187631.
commit aa419a527f91567691f226133efb0469b59359ac
Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu May 17 16:37:33 2012 +0000
* lto-symtab.c (lto_symtab_resolve_symbols): Preffer decl with
constructor
over decl without.
...
Here is another testcase (ICE with -O2):
% cat test2.i
struct demangle_component *a;
b;
d_demangle_callback () {
enum
{ DCT_GLOBAL_DTORS } c = 0;
if (0 ? : strncmp (&b, "_GLOBAL_", 8) == '.'
|| '_' == '$' == 'D' == 'I' == '_')
c = 'I' ? : 0;
switch (c)
case 0:
a = 0;
}
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (4 preceding siblings ...)
2012-05-21 15:25 ` markus at trippelsdorf dot de
@ 2012-05-22 13:07 ` vincenzo.innocente at cern dot ch
2012-05-22 13:43 ` vincenzo.innocente at cern dot ch
` (27 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-05-22 13:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
vincenzo Innocente <vincenzo.innocente at cern dot ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vincenzo.innocente at cern
| |dot ch
--- Comment #6 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-05-22 13:06:58 UTC ---
*** Bug 53450 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (5 preceding siblings ...)
2012-05-22 13:07 ` vincenzo.innocente at cern dot ch
@ 2012-05-22 13:43 ` vincenzo.innocente at cern dot ch
2012-05-23 9:03 ` vincenzo.innocente at cern dot ch
` (26 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-05-22 13:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #7 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-05-22 13:42:17 UTC ---
mine is a one-year-old libc
GNU C Library stable release version 2.13, by Roland McGrath et al.
….
Compiled by GNU CC version 4.6.1 20110520 (prerelease).
Compiled on a Linux 2.6.32 system on 2011-05-30.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (6 preceding siblings ...)
2012-05-22 13:43 ` vincenzo.innocente at cern dot ch
@ 2012-05-23 9:03 ` vincenzo.innocente at cern dot ch
2012-05-24 22:31 ` ebotcazou at gcc dot gnu.org
` (25 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-05-23 9:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #8 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-05-23 09:01:33 UTC ---
works with
/lib64/libc.so.6
GNU C Library stable release version 2.12, by Roland McGrath et al.
Compiled by GNU CC version 4.4.6 20110731 (Red Hat 4.4.6-3).
Compiled on a Linux 2.6.32 system on 2012-05-11.
"current" trunk
gcc version 4.8.0 20120523 (experimental) [trunk revision 187789] (GCC
configured with: ../gcc-trunk/configure --prefix=/home/data/newsoft/usr
-enable-languages=c,c++ -enable-gold=yes --enable-lto
--with-build-config=bootstrap-lto CFLAGS='-O2 -ftree-vectorize -fPIC'
CXXFLAGS='-O2 -fPIC -ftree-vectorize -fvisibility-inlines-hidden -march=native'
-enable-libitm -disable-multilib
on the same system failed with libc 2.13
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (7 preceding siblings ...)
2012-05-23 9:03 ` vincenzo.innocente at cern dot ch
@ 2012-05-24 22:31 ` ebotcazou at gcc dot gnu.org
2012-06-01 9:18 ` vincenzo.innocente at cern dot ch
` (24 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-05-24 22:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-05-24
CC| |ebotcazou at gcc dot
| |gnu.org
Ever Confirmed|0 |1
--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-05-24 22:20:47 UTC ---
> Only happened with bootstrap-lto.
Yes, I can reproduce it on an OpenSuSE 11.3 machine.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (8 preceding siblings ...)
2012-05-24 22:31 ` ebotcazou at gcc dot gnu.org
@ 2012-06-01 9:18 ` vincenzo.innocente at cern dot ch
2012-06-01 11:45 ` markus at trippelsdorf dot de
` (23 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-06-01 9:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #10 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-06-01 09:18:00 UTC ---
any chance this bug gets attention anytime soon?
It blocks test and development with newish versions of glibc...
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (9 preceding siblings ...)
2012-06-01 9:18 ` vincenzo.innocente at cern dot ch
@ 2012-06-01 11:45 ` markus at trippelsdorf dot de
2012-06-01 11:50 ` rguenth at gcc dot gnu.org
` (22 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-06-01 11:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #11 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-06-01 11:44:57 UTC ---
Just a shot into the dark:
The only difference between glibc-2.12 and later in this area
is the introduction of SSE4.2 (SSSE3) support...
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (10 preceding siblings ...)
2012-06-01 11:45 ` markus at trippelsdorf dot de
@ 2012-06-01 11:50 ` rguenth at gcc dot gnu.org
2012-06-01 11:54 ` markus at trippelsdorf dot de
` (21 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-01 11:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-01 11:50:33 UTC ---
You bootstrap-lto with -march=native -ftree-vectorize and then the
bootstrapped compiler ICEs with the posted testcases?
That would mean GCC is miscompiled, likely with a vectorizer bug ... that
it needs LTO will make it quite hard to track down though :(
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (11 preceding siblings ...)
2012-06-01 11:50 ` rguenth at gcc dot gnu.org
@ 2012-06-01 11:54 ` markus at trippelsdorf dot de
2012-06-01 12:01 ` vincenzo.innocente at cern dot ch
` (20 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-06-01 11:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #13 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-06-01 11:54:26 UTC ---
(In reply to comment #12)
> You bootstrap-lto with -march=native -ftree-vectorize and then the
> bootstrapped compiler ICEs with the posted testcases?
Yes.
> That would mean GCC is miscompiled, likely with a vectorizer bug ... that
> it needs LTO will make it quite hard to track down though :(
Any hints on how to track this down?
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (12 preceding siblings ...)
2012-06-01 11:54 ` markus at trippelsdorf dot de
@ 2012-06-01 12:01 ` vincenzo.innocente at cern dot ch
2012-06-01 12:31 ` markus at trippelsdorf dot de
` (19 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-06-01 12:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #14 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-06-01 12:01:00 UTC ---
no need of lto just
/home/data/newsoft/gcc-build/./gcc/xgcc -B/home/data/newsoft/gcc-build/./gcc/
-B/afs/cern.ch/user/i/innocent/w2/x86_64-unknown-linux-gnu/bin/
-B/afs/cern.ch/user/i/innocent/w2/x86_64-unknown-linux-gnu/lib/ -c test.i -O2
test.i:2:1: warning: data definition has no type or storage class [enabled by
default]
b;
^
test.i: In function 'd_demangle_callback':
test.i:6:21: internal compiler error: in int_mode_for_mode, at
stor-layout.c:423
if (0 ? : strncmp (&b, "_GLOBAL_", 8) == '.'
^
Please submit a full bug report,
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (13 preceding siblings ...)
2012-06-01 12:01 ` vincenzo.innocente at cern dot ch
@ 2012-06-01 12:31 ` markus at trippelsdorf dot de
2012-06-01 13:28 ` vincenzo.innocente at cern dot ch
` (18 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-06-01 12:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #15 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-06-01 12:31:37 UTC ---
(In reply to comment #13)
> (In reply to comment #12)
> > You bootstrap-lto with -march=native -ftree-vectorize and then the
> > bootstrapped compiler ICEs with the posted testcases?
>
> Yes.
It also happens without "-march=native -ftree-vectorize".
A simple "make -j4 profiledbootstrap" (--with-build-config=bootstrap-lto) also
fails.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (14 preceding siblings ...)
2012-06-01 12:31 ` markus at trippelsdorf dot de
@ 2012-06-01 13:28 ` vincenzo.innocente at cern dot ch
2012-06-11 11:09 ` rguenth at gcc dot gnu.org
` (17 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-06-01 13:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #16 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2012-06-01 13:27:55 UTC ---
in case it helps
run -fpreprocessed test.i -O2 -o bha.s
Starting program: /home/data/newsoft/gcc-build/gcc/cc1 -fpreprocessed test.i
-O2 -o bha.s
reading VI .tcshrc
tty
resize: Command not found.
test.i:2:1: warning: data definition has no type or storage class [enabled by
default]
b;
^
d_demangle_callback
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> <visibility> <early_local_cleanups> <whole-program>
<profile_estimate> <cp> <inline> <pure-const> <static-var>Assembling functions:
d_demangle_callback
Breakpoint 1, int_mode_for_mode (mode=VOIDmode) at
../../gcc-trunk/gcc/stor-layout.c:392
392 switch (GET_MODE_CLASS (mode))
(gdb) where
#0 int_mode_for_mode (mode=VOIDmode) at ../../gcc-trunk/gcc/stor-layout.c:392
#1 0x0000000000c89832 in emit_move_via_integer (mode=VOIDmode,
x=0x7ffff6d30c40, y=0x7ffff6d30ae0, force=Unhandled dwarf expression opcode
0xf3
) at ../../gcc-trunk/gcc/expr.c:3059
#2 0x000000000079b116 in emit_move_insn_1 (x=0x7ffff6d30c40, y=0x7ffff6d30ae0)
at ../../gcc-trunk/gcc/expr.c:3434
#3 0x000000000079b491 in emit_move_insn (x=0x7ffff6d30c40, y=0x7ffff6d30ae0)
at ../../gcc-trunk/gcc/expr.c:3497
#4 0x00000000007a764b in copy_to_reg (x=0x7ffff6d30ae0) at
../../gcc-trunk/gcc/explow.c:620
#5 0x0000000000592988 in gen_lowpart_general (mode=QImode, x=Unhandled dwarf
expression opcode 0xf3
) at ../../gcc-trunk/gcc/rtlhooks.c:50
#6 0x0000000000c62f47 in gen_cmpstrnsi (operand0=0x7ffff6d30ae0,
operand1=Unhandled dwarf expression opcode 0xf3
) at ../../gcc-trunk/gcc/config/i386/i386.md:16357
#7 0x000000000059a752 in
_ZL22expand_builtin_strncmpP9tree_nodeP7rtx_def12machine_mode.isra.40
(exp=0x7ffff6d2dd20, target=0x7ffff6d309a0)
at ../../gcc-trunk/gcc/builtins.c:4083
#8 0x000000000059ccd5 in expand_builtin (exp=0x7ffff6d2dd20, target=Unhandled
dwarf expression opcode 0xf3
) at ../../gcc-trunk/gcc/builtins.c:6252
#9 0x0000000000796a6d in expand_expr_real_1 (exp=0x7ffff6d2dd20, target=<value
optimized out>, tmode=SImode, modifier=EXPAND_NORMAL,
alt_rtl=0x7fffffffd9c8) at ../../gcc-trunk/gcc/expr.c:10155
#10 0x000000000079a51e in expand_expr_real (exp=0x7ffff6d2dd20,
target=Unhandled dwarf expression opcode 0xf3
) at ../../gcc-trunk/gcc/expr.c:7852
#11 0x000000000057ea62 in store_expr (exp=0x7ffff6d2dd20,
target=0x7ffff6d309a0, call_param_p=0, nontemporal=Unhandled dwarf expression
opcode 0xf3
) at ../../gcc-trunk/gcc/expr.c:5162
#12 0x0000000000587f6e in expand_assignment (to=0x7ffff6d2d870,
from=0x7ffff6d2dd20, nontemporal=Unhandled dwarf expression opcode 0xf3
) at ../../gcc-trunk/gcc/expr.c:4948
#13 0x00000000009bbd43 in expand_call_stmt (stmt=0x7ffff6d43690) at
../../gcc-trunk/gcc/cfgexpand.c:2080
#14 expand_gimple_stmt_1 (stmt=0x7ffff6d43690) at
../../gcc-trunk/gcc/cfgexpand.c:2121
#15 expand_gimple_stmt (stmt=0x7ffff6d43690) at
../../gcc-trunk/gcc/cfgexpand.c:2273
#16 0x0000000000b4fea1 in expand_gimple_basic_block (bb=0x7ffff6c0fbd0) at
../../gcc-trunk/gcc/cfgexpand.c:4039
#17 0x00000000008c4464 in gimple_expand_cfg () at
../../gcc-trunk/gcc/cfgexpand.c:4557
#18 0x0000000000bc0225 in execute_one_pass (pass=0x11691c0) at
../../gcc-trunk/gcc/passes.c:2164
#19 0x0000000000bc0715 in execute_pass_list (pass=0x11691c0) at
../../gcc-trunk/gcc/passes.c:2219
#20 0x0000000000bbfb46 in expand_function (node=0x7ffff6c1b750) at
../../gcc-trunk/gcc/cgraphunit.c:1622
#21 0x0000000000d11f6e in expand_all_functions () at
../../gcc-trunk/gcc/cgraphunit.c:1727
#22 compile () at ../../gcc-trunk/gcc/cgraphunit.c:2025
#23 compile () at ../../gcc-trunk/gcc/cgraphunit.c:1949
#24 0x0000000000d12785 in finalize_compilation_unit () at
../../gcc-trunk/gcc/cgraphunit.c:2102
#25 0x0000000000d12928 in c_write_global_declarations () at
../../gcc-trunk/gcc/c-decl.c:10106
#26 c_write_global_declarations () at ../../gcc-trunk/gcc/c-decl.c:10049
#27 0x000000000097ea26 in compile_file (argc=6, argv=0x7fffffffdf58) at
../../gcc-trunk/gcc/toplev.c:566
#28 do_compile (argc=6, argv=0x7fffffffdf58) at
../../gcc-trunk/gcc/toplev.c:1870
#29 toplev_main (argc=6, argv=0x7fffffffdf58) at
../../gcc-trunk/gcc/toplev.c:1946
#30 0x000000371721ecdd in __libc_start_main () from /lib64/libc.so.6
#31 0x00000000004b3f39 in _start ()
(gdb) s
391 {
(gdb) s
392 switch (GET_MODE_CLASS (mode))
(gdb) s
416 if (mode == BLKmode)
(gdb) s
390 int_mode_for_mode (enum machine_mode mode)
(gdb) s
int_mode_for_mode (mode=VOIDmode) at ../../gcc-trunk/gcc/stor-layout.c:423
423 gcc_unreachable ();
(gdb) s
fancy_abort (file=0xeefc38 "../../gcc-trunk/gcc/stor-layout.c", line=423,
function=0xf07160 "int_mode_for_mode") at ../../gcc-trunk/gcc/diagnostic.c:1010
1010 {
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (15 preceding siblings ...)
2012-06-01 13:28 ` vincenzo.innocente at cern dot ch
@ 2012-06-11 11:09 ` rguenth at gcc dot gnu.org
2012-06-13 14:36 ` markus at trippelsdorf dot de
` (16 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-11 11:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-11 11:09:17 UTC ---
I can reproduce it on SLE11-SP2, glibc-2.11.3, with plain ./configure
--with-build-config=bootstrap-lto.
Honza? I suppose we have spurious DECL_EXTERNAL somewhere? extern inline
fns maybe?
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (16 preceding siblings ...)
2012-06-11 11:09 ` rguenth at gcc dot gnu.org
@ 2012-06-13 14:36 ` markus at trippelsdorf dot de
2012-07-03 18:22 ` ubizjak at gmail dot com
` (15 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-06-13 14:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #18 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-06-13 14:36:23 UTC ---
Created attachment 27615
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27615
lto_bootstrap.patch
The following patch "fixes" the issue for me.
(Found by blindly poking around. But maybe this points in the right direction.
It just reverses a part of commit aa419a527f9156)
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 0dec33f..20a9a91 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -1123,12 +1123,11 @@ cgraph_only_called_directly_or_aliased_p (struct
cgraph_node *node)
static inline bool
varpool_can_remove_if_no_refs (struct varpool_node *node)
{
- if (DECL_EXTERNAL (node->symbol.decl))
- return true;
return (!node->symbol.force_output &&
!node->symbol.used_from_other_partition
- && (DECL_COMDAT (node->symbol.decl)
+ && (DECL_COMDAT (node->symbol.decl)
|| !node->symbol.externally_visible
- || DECL_HAS_VALUE_EXPR_P (node->symbol.decl)));
+ || DECL_HAS_VALUE_EXPR_P (node->symbol.decl)
+ || DECL_EXTERNAL (node->symbol.decl)));
}
/* Return true when all references to VNODE must be visible in ipa_ref_list.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (17 preceding siblings ...)
2012-06-13 14:36 ` markus at trippelsdorf dot de
@ 2012-07-03 18:22 ` ubizjak at gmail dot com
2012-07-03 18:46 ` hjl.tools at gmail dot com
` (14 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-03 18:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |53321
--- Comment #19 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-03 18:21:59 UTC ---
Updated patch:
--cut here--
Index: gcc/cgraph.h
===================================================================
--- gcc/cgraph.h (revision 189217)
+++ gcc/cgraph.h (working copy)
@@ -1123,13 +1123,12 @@ cgraph_only_called_directly_or_aliased_p (struct c
static inline bool
varpool_can_remove_if_no_refs (struct varpool_node *node)
{
- if (DECL_EXTERNAL (node->symbol.decl))
- return true;
return (!node->symbol.force_output &&
!node->symbol.used_from_other_partition
&& ((DECL_COMDAT (node->symbol.decl)
&& !symtab_used_from_object_file_p ((symtab_node) node))
|| !node->symbol.externally_visible
- || DECL_HAS_VALUE_EXPR_P (node->symbol.decl)));
+ || DECL_HAS_VALUE_EXPR_P (node->symbol.decl)
+ || DECL_EXTERNAL (node->symbol.decl)));
}
/* Return true when all references to VNODE must be visible in ipa_ref_list.
--cut here--
You will need patches from PR53321 to get up to this PR with current mainline.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (18 preceding siblings ...)
2012-07-03 18:22 ` ubizjak at gmail dot com
@ 2012-07-03 18:46 ` hjl.tools at gmail dot com
2012-07-04 10:11 ` ubizjak at gmail dot com
` (13 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: hjl.tools at gmail dot com @ 2012-07-03 18:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> 2012-07-03 18:45:40 UTC ---
This may be related to PR 53428.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (19 preceding siblings ...)
2012-07-03 18:46 ` hjl.tools at gmail dot com
@ 2012-07-04 10:11 ` ubizjak at gmail dot com
2012-07-04 10:38 ` ubizjak at gmail dot com
` (12 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-04 10:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #21 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-04 10:10:13 UTC ---
It looks that expand_builtin_strncmp gets miscompiled.
Try to compile the testcase from Comment #5 with -O2 on x86_64-pc-linux-gnu.
Put breakpoint in gen_cmpstrnsi.
When debugging "normal", non-LTO, non-profiled build, we get:
Breakpoint 1, gen_cmpstrnsi (operand0=0x7ffff1ace8a0, operand1=0x7ffff1acb8b8,
operand2=0x7ffff1acb918, operand3=0x7ffff19a84f0, operand4=0x7ffff19a8480)
at ../../gcc-svn/trunk/gcc/config/i386/i386.md:15989
15989 (set (match_operand:P 0 "register_operand" "=D")
(gdb) bt
#0 gen_cmpstrnsi (operand0=0x7ffff1ace8a0, operand1=0x7ffff1acb8b8,
operand2=0x7ffff1acb918,
operand3=0x7ffff19a84f0, operand4=0x7ffff19a8480)
at ../../gcc-svn/trunk/gcc/config/i386/i386.md:15989
#1 0x00000000005bb0c0 in expand_builtin_strncmp (exp=0x7ffff1acdd20,
target=0x7ffff1ace8a0,
mode=<optimized out>) at ../../gcc-svn/trunk/gcc/builtins.c:4000
(gdb) up
#1 0x00000000005bb0c0 in expand_builtin_strncmp (exp=0x7ffff1acdd20,
target=0x7ffff1ace8a0,
mode=<optimized out>) at ../../gcc-svn/trunk/gcc/builtins.c:4000
4000 GEN_INT (MIN (arg1_align, arg2_align)));
(gdb) li
3995
3996 arg1_rtx = get_memory_rtx (arg1, len);
3997 arg2_rtx = get_memory_rtx (arg2, len);
3998 arg3_rtx = expand_normal (len);
3999 insn = gen_cmpstrnsi (result, arg1_rtx, arg2_rtx, arg3_rtx,
4000 GEN_INT (MIN (arg1_align, arg2_align)));
4001 if (insn)
4002 {
4003 emit_insn (insn);
4004
(gdb) p target
$11 = (rtx_def *) 0x7ffff1ace8a0
(gdb) p result
$12 = (rtx_def *) 0x7ffff1ace8a0
(gdb)
debugging profiledbootstrap (--with-build-config=bootstrap-lto):
Breakpoint 3, gen_cmpstrnsi (operand0=0x7ffff1ace9e0, operand1=0x7ffff1acb8b8,
operand2=0x7ffff1acb918, operand3=0x7ffff19a84f0, operand4=0x7ffff19a8480)
at ../../gcc-svn/trunk/gcc/config/i386/i386.md:15989
15989 (set (match_operand:P 0 "register_operand" "=D")
(gdb) bt
#0 gen_cmpstrnsi (operand0=0x7ffff1ace9e0, operand1=0x7ffff1acb8b8,
operand2=0x7ffff1acb918,
operand3=0x7ffff19a84f0, operand4=0x7ffff19a8480)
at ../../gcc-svn/trunk/gcc/config/i386/i386.md:15989
#1 0x0000000000b3310f in
_ZL22expand_builtin_strncmpP9tree_nodeP7rtx_def12machine_mode.isra.13 (
target=0x7ffff1ace8a0, exp=0x7ffff1acdd20) at
../../gcc-svn/trunk/gcc/builtins.c:4000
(gdb) p target
$12 = (struct rtx_def *) 0x7ffff1ace8a0
(gdb) p result
$13 = '\000' <repeats 113 times>
(gdb)
The trick is that a couple of lines above, we have:
/* Make a place to write the result of the instruction. */
result = target;
if (! (result != 0
&& REG_P (result) && GET_MODE (result) == insn_mode
&& REGNO (result) >= FIRST_PSEUDO_REGISTER))
result = gen_reg_rtx (insn_mode);
Probably "result" doesn't get propagated correctly to gen_cmpstrnsi, we have:
(gdb) p *target
$15 = {code = REG, mode = SImode, jump = 0, call = 0, unchanging = 0, volatil =
0, in_struct = 0,
(gdb) down
#0 gen_cmpstrnsi (operand0=0x7ffff1ace9e0, operand1=0x7ffff1acb8b8,
operand2=0x7ffff1acb918,
operand3=0x7ffff19a84f0, operand4=0x7ffff19a8480)
at ../../gcc-svn/trunk/gcc/config/i386/i386.md:15989
15989 (set (match_operand:P 0 "register_operand" "=D")
(gdb) p *operand0
$14 = {code = REG, mode = VOIDmode, jump = 0, call = 0, unchanging = 0, volatil
= 0, in_struct = 0,
Everything goes downhill there.
(sorry for not using debug_rtx here, calling it gdb says "Cannot resolve
function debug_rtx to any overloaded instance".)
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (20 preceding siblings ...)
2012-07-04 10:11 ` ubizjak at gmail dot com
@ 2012-07-04 10:38 ` ubizjak at gmail dot com
2012-07-04 10:59 ` ubizjak at gmail dot com
` (11 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-04 10:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #22 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-04 10:37:48 UTC ---
Digging deeper, both testcases (from comment #0 and comment #5) fail due to:
enum machine_mode insn_mode
= insn_data[(int) CODE_FOR_cmpstrnsi].operand[0].mode;
The insn_mode is determined as VOIDmode in both cases. The testcase from
comment #0 fails in expand_builtin_strcmp (builtins.c line 3825) and the
testcase from comment #5 fails in expand_builtin_strncmp (builtins.c line
3937).
The pattern is defined in a correct way:
(define_expand "cmpstrnsi"
[(set (match_operand:SI 0 "register_operand")
(compare:SI (match_operand:BLK 1 "general_operand")
(match_operand:BLK 2 "general_operand")))
(use (match_operand 3 "general_operand"))
(use (match_operand 4 "immediate_operand"))]
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (21 preceding siblings ...)
2012-07-04 10:38 ` ubizjak at gmail dot com
@ 2012-07-04 10:59 ` ubizjak at gmail dot com
2012-07-04 11:17 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-04 10:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #23 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-04 10:58:03 UTC ---
Compiling testcase from comment 0, -O0:
(gdb) b builtins.c:3830
Breakpoint 1 at 0x522c91: file ../../gcc-svn/trunk/gcc/builtins.c, line 3830.
(gdb) r
Starting program: /home/uros/gcc-build-xxx/gcc/cc1 -O0 ttt.c
d_unqualified_name
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> <visibility> <early_local_cleanups>
<whole-program>Assembling functions:
d_unqualified_name
Breakpoint 1, expand_builtin_strcmp (exp=0x7ffff19a5b88, target=0x7ffff1ace360)
at ../../gcc-svn/trunk/gcc/builtins.c:3830
3830 if (len1)
(gdb) li
3827 tree len1 = c_strlen (arg1, 1);
3828 tree len2 = c_strlen (arg2, 1);
3829
3830 if (len1)
(gdb) p insn_mode
$1 = VOIDmode
(gdb) p insn_data[2829]
$2 = {name = 0xdc80ab "cmpstrnsi", output = {single = 0x0, multi = 0x0,
function = 0},
genfun = 0x623d95 <gen_cmpstrnsi(rtx_def*, rtx_def*, rtx_def*, rtx_def*,
rtx_def*)>,
operand = 0xe09e98, n_generator_args = 5 '\005', n_operands = 5 '\005',
n_dups = 0 '\000',
n_alternatives = 0 '\000', output_format = 0 '\000'}
(gdb) p insn_data[2829].operand[0].mode
$3 = SImode
But...
enum machine_mode insn_mode
= insn_data[(int) CODE_FOR_cmpstrnsi].operand[0].mode;
tree len1 = c_strlen (arg1, 1);
tree len2 = c_strlen (arg2, 1);
Something is seriously broken here. insn_mode should get SImode, not VOIDmode.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (22 preceding siblings ...)
2012-07-04 10:59 ` ubizjak at gmail dot com
@ 2012-07-04 11:17 ` rguenth at gcc dot gnu.org
2012-07-04 11:28 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 11:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #24 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 11:16:20 UTC ---
The hint in comment #5 together with your analysis points at the initializer
in insn-output.c:
const struct insn_data_d insn_data[] =
{
...
/* /space/rguenther/src/svn/trunk/gcc/config/i386/i386.md:16008 */
{
"cmpstrnsi",
#if HAVE_DESIGNATED_UNION_INITIALIZERS
{ 0 },
#else
{ 0, 0, 0 },
#endif
(insn_gen_fn) gen_cmpstrnsi,
&operand_data[5173],
5,
5,
0,
0,
0
},
and operand_data in
static const struct insn_operand_data operand_data[] =
{
...
{
0,
"",
VOIDmode,
0,
0,
1,
0
},
{ <--- should be this
register_operand,
"",
SImode,
0,
0,
1,
0
},
{
general_operand,
"",
BLKmode,
0,
0,
1,
1
},
so maybe there is an off-by-one error somewhere in constant folding from
initializers?
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (23 preceding siblings ...)
2012-07-04 11:17 ` rguenth at gcc dot gnu.org
@ 2012-07-04 11:28 ` rguenth at gcc dot gnu.org
2012-07-04 11:31 ` ubizjak at gmail dot com
` (8 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 11:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #25 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 11:26:55 UTC ---
Or the insn_data initializer does not properly point to the operand_data
initializer (maybe that is non-existent or the magic LTO error_mark_node
and we fold that in a wrong way - VOIDmode happens to be zero after all...).
See the special code in get_base_constructor in gimple-fold.c:
/* See if we can find constructor defining value of BASE.
When we know the consructor with constant offset (such as
base is array[40] and we do know constructor of array), then
BIT_OFFSET is adjusted accordingly.
As a special case, return error_mark_node when constructor
is not explicitly available, but it is known to be zero
such as 'static const int a;'. */
static tree
get_base_constructor (tree base, HOST_WIDE_INT *bit_offset,
tree (*valueize)(tree))
...
switch (TREE_CODE (base))
{
case VAR_DECL:
if (!const_value_known_p (base))
return NULL_TREE;
/* Fallthru. */
case CONST_DECL:
if (!DECL_INITIAL (base)
&& (TREE_STATIC (base) || DECL_EXTERNAL (base)))
return error_mark_node;
return DECL_INITIAL (base);
and lto-streamer-out.c:
/* Write a physical representation of tree node EXPR to output block
OB. If REF_P is true, the leaves of EXPR are emitted as references
via lto_output_tree_ref. IX is the index into the streamer cache
where EXPR is stored. */
static void
lto_write_tree (struct output_block *ob, tree expr, bool ref_p)
{
...
/* Handle DECL_INITIAL for symbols. */
tree initial = DECL_INITIAL (expr);
if (TREE_CODE (expr) == VAR_DECL
&& (TREE_STATIC (expr) || DECL_EXTERNAL (expr))
&& initial)
{
lto_varpool_encoder_t varpool_encoder;
struct varpool_node *vnode;
varpool_encoder = ob->decl_state->varpool_node_encoder;
vnode = varpool_get_node (expr);
if (!vnode
|| !lto_varpool_encoder_encode_initializer_p (varpool_encoder,
vnode))
initial = error_mark_node;
So, does
Index: gimple-fold.c
===================================================================
--- gimple-fold.c (revision 189251)
+++ gimple-fold.c (working copy)
@@ -2713,6 +2713,8 @@ get_base_constructor (tree base, HOST_WI
if (!DECL_INITIAL (base)
&& (TREE_STATIC (base) || DECL_EXTERNAL (base)))
return error_mark_node;
+ if (DECL_INITIAL (base) == error_mark_node)
+ return NULL_TREE;
return DECL_INITIAL (base);
case ARRAY_REF:
fix it?
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (24 preceding siblings ...)
2012-07-04 11:28 ` rguenth at gcc dot gnu.org
@ 2012-07-04 11:31 ` ubizjak at gmail dot com
2012-07-04 11:54 ` markus at trippelsdorf dot de
` (7 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-04 11:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #26 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-04 11:30:26 UTC ---
(In reply to comment #25)
> So, does
>
> Index: gimple-fold.c
> ===================================================================
> --- gimple-fold.c (revision 189251)
> +++ gimple-fold.c (working copy)
> @@ -2713,6 +2713,8 @@ get_base_constructor (tree base, HOST_WI
> if (!DECL_INITIAL (base)
> && (TREE_STATIC (base) || DECL_EXTERNAL (base)))
> return error_mark_node;
> + if (DECL_INITIAL (base) == error_mark_node)
> + return NULL_TREE;
> return DECL_INITIAL (base);
>
> case ARRAY_REF:
>
> fix it?
Let me restart the bootstrap, I will report ASAP.
BTW: There is no referece to insn_data in failing expand_builtin_strcmp objdump
asm dump.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (25 preceding siblings ...)
2012-07-04 11:31 ` ubizjak at gmail dot com
@ 2012-07-04 11:54 ` markus at trippelsdorf dot de
2012-07-04 12:15 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: markus at trippelsdorf dot de @ 2012-07-04 11:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #27 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-07-04 11:53:56 UTC ---
(In reply to comment #25)
> So, does
>
> Index: gimple-fold.c
> ===================================================================
> --- gimple-fold.c (revision 189251)
> +++ gimple-fold.c (working copy)
> @@ -2713,6 +2713,8 @@ get_base_constructor (tree base, HOST_WI
> if (!DECL_INITIAL (base)
> && (TREE_STATIC (base) || DECL_EXTERNAL (base)))
> return error_mark_node;
> + if (DECL_INITIAL (base) == error_mark_node)
> + return NULL_TREE;
> return DECL_INITIAL (base);
>
> case ARRAY_REF:
>
> fix it?
Yes!
At least gcc builds now without errors.
(I didn't run the test-suite yet)
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (26 preceding siblings ...)
2012-07-04 11:54 ` markus at trippelsdorf dot de
@ 2012-07-04 12:15 ` rguenth at gcc dot gnu.org
2012-07-04 12:33 ` ubizjak at gmail dot com
` (5 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 12:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #28 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 12:14:03 UTC ---
Ok, I'll bootstrap and test and commit the fix. Thanks for tracking it down
up to a point where I thought *well, that sounds familiar in some way* ;)
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (27 preceding siblings ...)
2012-07-04 12:15 ` rguenth at gcc dot gnu.org
@ 2012-07-04 12:33 ` ubizjak at gmail dot com
2012-07-04 13:48 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: ubizjak at gmail dot com @ 2012-07-04 12:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #29 from Uros Bizjak <ubizjak at gmail dot com> 2012-07-04 12:32:25 UTC ---
The patch from Comment #25 works for me, too. You will need a bunch of patches
from PR53321 to finish LTO profiledbootstrap, I will post these to gcc-patches@
mailing list.
Regression test is currently in progress. All looks OK.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (28 preceding siblings ...)
2012-07-04 12:33 ` ubizjak at gmail dot com
@ 2012-07-04 13:48 ` rguenth at gcc dot gnu.org
2012-07-04 13:54 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 13:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #30 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 13:47:26 UTC ---
Author: rguenth
Date: Wed Jul 4 13:47:18 2012
New Revision: 189260
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189260
Log:
2012-07-04 Richard Guenther <rguenther@suse.de>
PR middle-end/53433
* gimple-fold.c (get_base_constructor): Do not return an
error_mark_node DECL_INITIAL.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (29 preceding siblings ...)
2012-07-04 13:48 ` rguenth at gcc dot gnu.org
@ 2012-07-04 13:54 ` rguenth at gcc dot gnu.org
2012-07-04 13:57 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 13:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #31 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 13:53:20 UTC ---
Author: rguenth
Date: Wed Jul 4 13:53:11 2012
New Revision: 189262
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189262
Log:
2012-07-04 Richard Guenther <rguenther@suse.de>
PR middle-end/53433
* gimple-fold.c (get_base_constructor): Do not return an
error_mark_node DECL_INITIAL.
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/gimple-fold.c
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (31 preceding siblings ...)
2012-07-04 13:57 ` rguenth at gcc dot gnu.org
@ 2012-07-04 13:57 ` rguenth at gcc dot gnu.org
2012-07-04 13:58 ` rguenth at gcc dot gnu.org
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 13:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
--- Comment #32 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 13:56:05 UTC ---
Author: rguenth
Date: Wed Jul 4 13:56:00 2012
New Revision: 189263
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189263
Log:
2012-07-04 Richard Guenther <rguenther@suse.de>
PR middle-end/53433
* tree-ssa-ccp.c (get_base_constructor): Do not return an
error_mark_node DECL_INITIAL.
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/tree-ssa-ccp.c
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (30 preceding siblings ...)
2012-07-04 13:54 ` rguenth at gcc dot gnu.org
@ 2012-07-04 13:57 ` rguenth at gcc dot gnu.org
2012-07-04 13:57 ` rguenth at gcc dot gnu.org
2012-07-04 13:58 ` rguenth at gcc dot gnu.org
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 13:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #32 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 13:56:05 UTC ---
Author: rguenth
Date: Wed Jul 4 13:56:00 2012
New Revision: 189263
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189263
Log:
2012-07-04 Richard Guenther <rguenther@suse.de>
PR middle-end/53433
* tree-ssa-ccp.c (get_base_constructor): Do not return an
error_mark_node DECL_INITIAL.
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/tree-ssa-ccp.c
--- Comment #33 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 13:56:50 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
` (32 preceding siblings ...)
2012-07-04 13:57 ` rguenth at gcc dot gnu.org
@ 2012-07-04 13:58 ` rguenth at gcc dot gnu.org
33 siblings, 0 replies; 35+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-04 13:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53433
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #33 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-04 13:56:50 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2012-07-04 13:58 UTC | newest]
Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-21 11:00 [Bug c/53433] New: [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during bootstrap markus at trippelsdorf dot de
2012-05-21 12:39 ` [Bug c/53433] " markus at trippelsdorf dot de
2012-05-21 12:41 ` [Bug middle-end/53433] [4.8 Regression] ICE in int_mode_for_mode, at stor-layout.c:424 during lto-bootstrap rguenth at gcc dot gnu.org
2012-05-21 12:41 ` markus at trippelsdorf dot de
2012-05-21 12:47 ` rguenth at gcc dot gnu.org
2012-05-21 15:25 ` markus at trippelsdorf dot de
2012-05-22 13:07 ` vincenzo.innocente at cern dot ch
2012-05-22 13:43 ` vincenzo.innocente at cern dot ch
2012-05-23 9:03 ` vincenzo.innocente at cern dot ch
2012-05-24 22:31 ` ebotcazou at gcc dot gnu.org
2012-06-01 9:18 ` vincenzo.innocente at cern dot ch
2012-06-01 11:45 ` markus at trippelsdorf dot de
2012-06-01 11:50 ` rguenth at gcc dot gnu.org
2012-06-01 11:54 ` markus at trippelsdorf dot de
2012-06-01 12:01 ` vincenzo.innocente at cern dot ch
2012-06-01 12:31 ` markus at trippelsdorf dot de
2012-06-01 13:28 ` vincenzo.innocente at cern dot ch
2012-06-11 11:09 ` rguenth at gcc dot gnu.org
2012-06-13 14:36 ` markus at trippelsdorf dot de
2012-07-03 18:22 ` ubizjak at gmail dot com
2012-07-03 18:46 ` hjl.tools at gmail dot com
2012-07-04 10:11 ` ubizjak at gmail dot com
2012-07-04 10:38 ` ubizjak at gmail dot com
2012-07-04 10:59 ` ubizjak at gmail dot com
2012-07-04 11:17 ` rguenth at gcc dot gnu.org
2012-07-04 11:28 ` rguenth at gcc dot gnu.org
2012-07-04 11:31 ` ubizjak at gmail dot com
2012-07-04 11:54 ` markus at trippelsdorf dot de
2012-07-04 12:15 ` rguenth at gcc dot gnu.org
2012-07-04 12:33 ` ubizjak at gmail dot com
2012-07-04 13:48 ` rguenth at gcc dot gnu.org
2012-07-04 13:54 ` rguenth at gcc dot gnu.org
2012-07-04 13:57 ` rguenth at gcc dot gnu.org
2012-07-04 13:57 ` rguenth at gcc dot gnu.org
2012-07-04 13:58 ` rguenth at gcc dot gnu.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).