* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
@ 2010-10-21 20:32 ` ro at gcc dot gnu.org
2010-10-21 20:33 ` ro at gcc dot gnu.org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-21 20:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-21 20:31:57 UTC ---
Created attachment 22109
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22109
main program of testcase
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
2010-10-21 20:32 ` [Bug rtl-optimization/46114] " ro at gcc dot gnu.org
@ 2010-10-21 20:33 ` ro at gcc dot gnu.org
2010-10-21 20:36 ` ro at gcc dot gnu.org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-21 20:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-21 20:32:47 UTC ---
Created attachment 22110
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22110
miscompiled part of the test
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
2010-10-21 20:32 ` [Bug rtl-optimization/46114] " ro at gcc dot gnu.org
2010-10-21 20:33 ` ro at gcc dot gnu.org
@ 2010-10-21 20:36 ` ro at gcc dot gnu.org
2010-10-21 20:41 ` hjl.tools at gmail dot com
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-21 20:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.10.21 20:36:21
Ever Confirmed|0 |1
--- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-21 20:36:21 UTC ---
I could reproduce the bug with the attached testcase (go.c with main,
pr46114.c reduced from g++spec.c).
Compile with
% gcc -O2 -o go go.c pr46114.c
After the culprit patch, the program prints
opt_index = 902 arg = 8049253 value = 1 lang_mask = 65536 decoded = 1
opt_index = 902 arg = 8049264 value = 1 lang_mask = 65536 decoded = 804a90c
opt_index = 1019 arg = 0 value = 1 lang_mask = 65536 decoded = 804a938
i.e. decoded (a pointer) is invalid. Before, one gets
opt_index = 902 arg = 8049273 value = 1 lang_mask = 65536 decoded = 804a900
opt_index = 902 arg = 8049284 value = 1 lang_mask = 65536 decoded = 804a92c
opt_index = 1019 arg = 0 value = 1 lang_mask = 65536 decoded = 804a958
The bug is extremely sensitive to the details of the input, so I didn't try
to reduce it further.
Please fix, this is really ugly and makes gcc with gld completely useless.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (2 preceding siblings ...)
2010-10-21 20:36 ` ro at gcc dot gnu.org
@ 2010-10-21 20:41 ` hjl.tools at gmail dot com
2010-10-21 20:58 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-21 20:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-21 20:41:06 UTC ---
Can you try
http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01858.html
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (3 preceding siblings ...)
2010-10-21 20:41 ` hjl.tools at gmail dot com
@ 2010-10-21 20:58 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-10-21 23:34 ` bernds at gcc dot gnu.org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2010-10-21 20:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2010-10-21 20:57:42 UTC ---
> --- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-21 20:41:06 UTC ---
> Can you try
>
> http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01858.html
Doesn't make a difference unfortunately.
Thanks.
Rainer
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (4 preceding siblings ...)
2010-10-21 20:58 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2010-10-21 23:34 ` bernds at gcc dot gnu.org
2010-10-22 10:09 ` ro at gcc dot gnu.org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: bernds at gcc dot gnu.org @ 2010-10-21 23:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #6 from Bernd Schmidt <bernds at gcc dot gnu.org> 2010-10-21 23:33:47 UTC ---
I'm assuming you run the testcase on Solaris? Can you provide good/bad assembly
output?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (5 preceding siblings ...)
2010-10-21 23:34 ` bernds at gcc dot gnu.org
@ 2010-10-22 10:09 ` ro at gcc dot gnu.org
2010-10-22 10:10 ` ro at gcc dot gnu.org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-22 10:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #7 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-22 10:09:26 UTC ---
Created attachment 22113
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22113
working assembler output
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (6 preceding siblings ...)
2010-10-22 10:09 ` ro at gcc dot gnu.org
@ 2010-10-22 10:10 ` ro at gcc dot gnu.org
2010-10-22 10:15 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-22 10:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #8 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-22 10:10:13 UTC ---
Created attachment 22114
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22114
miscompiled assembler output
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (7 preceding siblings ...)
2010-10-22 10:10 ` ro at gcc dot gnu.org
@ 2010-10-22 10:15 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-10-22 13:25 ` bernds at gcc dot gnu.org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2010-10-22 10:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2010-10-22 10:15:20 UTC ---
> --- Comment #6 from Bernd Schmidt <bernds at gcc dot gnu.org> 2010-10-21 23:33:47 UTC ---
> I'm assuming you run the testcase on Solaris? Can you provide good/bad assembly
> output?
Sure, both attached. Each of them was compiled with gcc -g -O2 -S.
As could be expected, the bug has nothing to do with wether or nor gld
is in use, only with the details of the input. It can be reproduced
with a gcc configured to use Sun as and ld instead of gas and gld. The
attached -S output is for a compiler configured to use CVS gas and gld,
though. The bad one is from r164552 (your patch), the good one from
r164551 (the last working rev).
Thanks.
Rainer
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (8 preceding siblings ...)
2010-10-22 10:15 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2010-10-22 13:25 ` bernds at gcc dot gnu.org
2010-10-22 13:35 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: bernds at gcc dot gnu.org @ 2010-10-22 13:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
Bernd Schmidt <bernds at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernds at gcc dot gnu.org
--- Comment #10 from Bernd Schmidt <bernds at gcc dot gnu.org> 2010-10-22 13:24:53 UTC ---
I'll also need preprocessed source since I'm lacking Solaris includes. I'll be
away for a few weeks so there might be no progress on this bug during that
time.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (9 preceding siblings ...)
2010-10-22 13:25 ` bernds at gcc dot gnu.org
@ 2010-10-22 13:35 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-11-03 15:38 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2010-10-22 13:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #11 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2010-10-22 13:35:08 UTC ---
> --- Comment #10 from Bernd Schmidt <bernds at gcc dot gnu.org> 2010-10-22 13:24:53 UTC ---
> I'll also need preprocessed source since I'm lacking Solaris includes. I'll be
> away for a few weeks so there might be no progress on this bug during that
> time.
It should suffice to replace the includes with declarations of size_t,
abort, calloc, malloc, strcmp, and strlen in pr46114.c:
typedef unsigned int size_t;
extern void abort(void);
extern void *calloc(size_t, size_t);
extern void *malloc(size_t);
extern int strcmp(const char *, const char *);
extern size_t strlen(const char *);
I've replaced those by the corresponding includes so one can compile and
run the testcase on other platforms.
I'll be away until next tuesday myself and won't be reading email during
that time. I very much hope this can be fixed before 4.6.0 is released.
Rainer
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (10 preceding siblings ...)
2010-10-22 13:35 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2010-11-03 15:38 ` rguenth at gcc dot gnu.org
2010-11-03 17:10 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-03 15:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (11 preceding siblings ...)
2010-11-03 15:38 ` rguenth at gcc dot gnu.org
@ 2010-11-03 17:10 ` hjl.tools at gmail dot com
2010-11-04 18:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: hjl.tools at gmail dot com @ 2010-11-03 17:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-03 17:10:07 UTC ---
Please try revision 166259.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (12 preceding siblings ...)
2010-11-03 17:10 ` hjl.tools at gmail dot com
@ 2010-11-04 18:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-11-08 7:31 ` steven at gcc dot gnu.org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2010-11-04 18:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #13 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2010-11-04 18:48:46 UTC ---
> --- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-03 17:10:07 UTC ---
> Please try revision 166259.
As expected, the reversion fixes the testcase. A full bootstrap with
CVS gas and gld is currently running, and g++ is already running
successfully.
Rainer
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (13 preceding siblings ...)
2010-11-04 18:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2010-11-08 7:31 ` steven at gcc dot gnu.org
2010-11-25 16:08 ` bernds at gcc dot gnu.org
2010-11-25 16:51 ` ro at CeBiTec dot Uni-Bielefeld.DE
16 siblings, 0 replies; 18+ messages in thread
From: steven at gcc dot gnu.org @ 2010-11-08 7:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
Steven Bosscher <steven at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
CC| |steven at gcc dot gnu.org
Resolution| |FIXED
--- Comment #14 from Steven Bosscher <steven at gcc dot gnu.org> 2010-11-08 07:30:47 UTC ---
Fixed by the commit that reverted bernds' patch.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (14 preceding siblings ...)
2010-11-08 7:31 ` steven at gcc dot gnu.org
@ 2010-11-25 16:08 ` bernds at gcc dot gnu.org
2010-11-25 16:51 ` ro at CeBiTec dot Uni-Bielefeld.DE
16 siblings, 0 replies; 18+ messages in thread
From: bernds at gcc dot gnu.org @ 2010-11-25 16:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #15 from Bernd Schmidt <bernds at gcc dot gnu.org> 2010-11-25 16:05:36 UTC ---
Can you go back to the failing sources and test whether
http://gcc.gnu.org/ml/gcc-patches/2010-10/msg02569.html
fixes the problem?
For future bug reports, please use gcc -v -save-temps, then post the
preprocessed source and the exact options that were passed to cc1. I've managed
to reproduce the code generation, but only with an explicit "-march=i686" which
required some guessing.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug rtl-optimization/46114] [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
` (15 preceding siblings ...)
2010-11-25 16:08 ` bernds at gcc dot gnu.org
@ 2010-11-25 16:51 ` ro at CeBiTec dot Uni-Bielefeld.DE
16 siblings, 0 replies; 18+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2010-11-25 16:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114
--- Comment #16 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2010-11-25 16:25:35 UTC ---
> --- Comment #15 from Bernd Schmidt <bernds at gcc dot gnu.org> 2010-11-25 16:05:36 UTC ---
> Can you go back to the failing sources and test whether
> http://gcc.gnu.org/ml/gcc-patches/2010-10/msg02569.html
> fixes the problem?
Looks good indeed. I didn't try a full bootstrap but just up to the
point where g++ failed before.
> For future bug reports, please use gcc -v -save-temps, then post the
> preprocessed source and the exact options that were passed to cc1. I've managed
> to reproduce the code generation, but only with an explicit "-march=i686" which
> required some guessing.
Ok, will do. Thanks for fixing this.
Rainer
^ permalink raw reply [flat|nested] 18+ messages in thread