public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/55660] New: ICE instead of some warning during lto build
@ 2012-12-12 6:40 vbyakovl23 at gmail dot com
2012-12-12 9:55 ` [Bug lto/55660] [4.7/4.8 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none) rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: vbyakovl23 at gmail dot com @ 2012-12-12 6:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55660
Bug #: 55660
Summary: ICE instead of some warning during lto build
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: vbyakovl23@gmail.com
LTO compilation fails in the link time if o-files created with -funsigned-char
but linking without.
R174519 is the first commit when it was appeared.
$ cat t_f.c
char n[3] = {'a','b','c'};
int foo(char *x)
{
if (*x == 'y')
return (int)*x;
*x = 'y';
return 0;
}
$ cat t_m.c
#include <stdio.h>
extern int foo (char*);
extern char n[3];
int main ()
{
int i, m = 0;
for (i = 0; i < 3; i++)
m += foo(&n[i]);
printf("%d\n", m);
}
$ gcc -c -m32 -O2 -flto t_f.c t_m.c -funsigned-char ; gcc -m32 -O2 -flto
t_f.o t_m.o -o t0
In file included from :0:0:
t_m.c: In function a€?maina€™:
t_m.c:7:5: error: mismatching comparison operand types
int main ()
^
char
unsigned char
if (_14 == 121)
t_m.c:7:5: internal compiler error: verify_gimple failed
0x98ab8b verify_gimple_in_cfg(function*)
../../gcc/gcc/tree-cfg.c:4728
0x8794d0 execute_function_todo
../../gcc/gcc/passes.c:1973
0x8787e9 do_per_function
../../gcc/gcc/passes.c:1705
0x8795f4 execute_todo
../../gcc/gcc/passes.c:2006
0x879a5e execute_one_ipa_transform_pass
../../gcc/gcc/passes.c:2183
0x879b42 execute_all_ipa_transforms()
../../gcc/gcc/passes.c:2213
0x5ae627 expand_function
../../gcc/gcc/cgraphunit.c:1615
0x5aeb00 expand_all_functions
../../gcc/gcc/cgraphunit.c:1726
0x5af58a compile()
../../gcc/gcc/cgraphunit.c:2024
0x512f39 lto_main()
../../gcc/gcc/lto/lto.c:3399
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: gcc returned 1 exit status
/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/export/users/vbyakovl/workspaces/gcc/install-ref/libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure CFLAGS='-O0 -g3'
--prefix=/export/users/vbyakovl/workspaces/gcc/install-ref --disable-bootstrap
--enable-languages=c,c++,fortran,lto CXXFLAGS='-O0 -g3'
Thread model: posix
gcc version 4.8.0 20121105 (experimental) (GCC)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/55660] [4.7/4.8 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none)
2012-12-12 6:40 [Bug lto/55660] New: ICE instead of some warning during lto build vbyakovl23 at gmail dot com
@ 2012-12-12 9:55 ` rguenth at gcc dot gnu.org
2012-12-12 14:19 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-12 9:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55660
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Status|UNCONFIRMED |ASSIGNED
Known to work| |4.6.3
Keywords| |ice-checking,
| |ice-on-valid-code, lto
Last reconfirmed| |2012-12-12
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
Summary|ICE instead of some warning |[4.7/4.8 Regression] ICE
|during lto build with |instead of some warning
|supplied different options |during lto build with
|(-funsigned-char vs none) |supplied different options
| |(-funsigned-char vs none)
Target Milestone|--- |4.7.3
Known to fail| |4.7.2, 4.8.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-12 09:54:49 UTC ---
Confirmed. I'll have a looksee.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/55660] [4.7/4.8 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none)
2012-12-12 6:40 [Bug lto/55660] New: ICE instead of some warning during lto build vbyakovl23 at gmail dot com
2012-12-12 9:55 ` [Bug lto/55660] [4.7/4.8 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none) rguenth at gcc dot gnu.org
@ 2012-12-12 14:19 ` rguenth at gcc dot gnu.org
2012-12-13 11:13 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-12 14:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55660
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-12 14:18:46 UTC ---
Ok, the issue is we preload char_type_node anyway, as show by
Index: gcc/tree-streamer.c
===================================================================
--- gcc/tree-streamer.c (revision 194444)
+++ gcc/tree-streamer.c (working copy)
@@ -237,6 +237,12 @@ streamer_tree_cache_lookup (struct strea
static void
record_common_node (struct streamer_tree_cache_d *cache, tree node)
{
+ /* Verify we don't recursively pre-load nodes we do not want to preload. */
+ gcc_assert (node != char_type_node
+ && node != boolean_type_node
+ && node != boolean_true_node
+ && node != boolean_false_node);
+
/* We have to make sure to fill exactly the same number of
elements for all frontends. That can include NULL trees.
As our hash table can't deal with zero entries we'll simply stream
this is because we pre-load va_list_type_node (which is required, because
we compare that by pointer equality). But the x86 backend (and possibly
others) do:
static tree
ix86_build_builtin_va_list_abi (enum calling_abi abi)
{
tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl;
/* For i386 we use plain pointer to argument area. */
if (!TARGET_64BIT || abi == MS_ABI)
return build_pointer_type (char_type_node);
oops.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/55660] [4.7/4.8 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none)
2012-12-12 6:40 [Bug lto/55660] New: ICE instead of some warning during lto build vbyakovl23 at gmail dot com
2012-12-12 9:55 ` [Bug lto/55660] [4.7/4.8 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none) rguenth at gcc dot gnu.org
2012-12-12 14:19 ` rguenth at gcc dot gnu.org
@ 2012-12-13 11:13 ` rguenth at gcc dot gnu.org
2012-12-13 11:14 ` [Bug lto/55660] [4.7 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-13 11:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55660
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-13 11:13:19 UTC ---
Author: rguenth
Date: Thu Dec 13 11:13:13 2012
New Revision: 194473
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194473
Log:
2012-12-13 Richard Biener <rguenther@suse.de>
PR lto/55660
* tree-streamer.c (record_common_node): Check that we are not
recursively pre-loading nodes we want to skip. Handle
char_type_node appearing as part of va_list_type_node.
* gcc.dg/lto/pr55660_0.c: New testcase.
* gcc.dg/lto/pr55660_1.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.dg/lto/pr55660_0.c
trunk/gcc/testsuite/gcc.dg/lto/pr55660_1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-streamer.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/55660] [4.7 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none)
2012-12-12 6:40 [Bug lto/55660] New: ICE instead of some warning during lto build vbyakovl23 at gmail dot com
` (2 preceding siblings ...)
2012-12-13 11:13 ` rguenth at gcc dot gnu.org
@ 2012-12-13 11:14 ` rguenth at gcc dot gnu.org
2013-02-04 12:05 ` rguenth at gcc dot gnu.org
2013-02-04 12:07 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-13 11:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55660
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.8.0
Summary|[4.7/4.8 Regression] ICE |[4.7 Regression] ICE
|instead of some warning |instead of some warning
|during lto build with |during lto build with
|supplied different options |supplied different options
|(-funsigned-char vs none) |(-funsigned-char vs none)
Known to fail|4.8.0 |
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-13 11:13:53 UTC ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/55660] [4.7 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none)
2012-12-12 6:40 [Bug lto/55660] New: ICE instead of some warning during lto build vbyakovl23 at gmail dot com
` (3 preceding siblings ...)
2012-12-13 11:14 ` [Bug lto/55660] [4.7 " rguenth at gcc dot gnu.org
@ 2013-02-04 12:05 ` rguenth at gcc dot gnu.org
2013-02-04 12:07 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-04 12:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55660
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-04 12:04:43 UTC ---
Author: rguenth
Date: Mon Feb 4 12:04:35 2013
New Revision: 195708
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195708
Log:
2013-02-04 Richard Biener <rguenther@suse.de>
Backport from mainline
2012-07-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53844
* tree-ssa-dse.c (dse_possible_dead_store_p): Properly handle
the loop virtual PHI.
* g++.dg/tree-ssa/pr53844.C: New testcase.
2012-12-13 Richard Biener <rguenther@suse.de>
PR lto/55660
* tree-streamer.c (record_common_node): Check that we are not
recursively pre-loading nodes we want to skip. Handle
char_type_node appearing as part of va_list_type_node.
* gcc.dg/lto/pr55660_0.c: New testcase.
* gcc.dg/lto/pr55660_1.c: Likewise.
2013-02-04 Richard Biener <rguenther@suse.de>
PR middle-end/55890
* gimple.h (gimple_call_builtin_class_p): New function.
* gimple.c (validate_call): New function.
(gimple_call_builtin_class_p): Likewise.
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
Use gimple_call_builtin_class_p.
(find_func_clobbers): Likewise.
* tree-ssa-strlen.c (adjust_last_stmt): Likewise.
(strlen_optimize_stmt): Likewise.
* gcc.dg/torture/pr55890-1.c: New testcase.
* gcc.dg/torture/pr55890-2.c: Likewise.
Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/tree-ssa/pr53844.C
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/lto/pr55660_0.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/lto/pr55660_1.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr55890-1.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr55890-2.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/gimple.c
branches/gcc-4_7-branch/gcc/gimple.h
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-ssa-dse.c
branches/gcc-4_7-branch/gcc/tree-ssa-strlen.c
branches/gcc-4_7-branch/gcc/tree-ssa-structalias.c
branches/gcc-4_7-branch/gcc/tree-streamer.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/55660] [4.7 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none)
2012-12-12 6:40 [Bug lto/55660] New: ICE instead of some warning during lto build vbyakovl23 at gmail dot com
` (4 preceding siblings ...)
2013-02-04 12:05 ` rguenth at gcc dot gnu.org
@ 2013-02-04 12:07 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-04 12:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55660
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.7.3
Resolution| |FIXED
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-04 12:06:46 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-04 12:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-12 6:40 [Bug lto/55660] New: ICE instead of some warning during lto build vbyakovl23 at gmail dot com
2012-12-12 9:55 ` [Bug lto/55660] [4.7/4.8 Regression] ICE instead of some warning during lto build with supplied different options (-funsigned-char vs none) rguenth at gcc dot gnu.org
2012-12-12 14:19 ` rguenth at gcc dot gnu.org
2012-12-13 11:13 ` rguenth at gcc dot gnu.org
2012-12-13 11:14 ` [Bug lto/55660] [4.7 " rguenth at gcc dot gnu.org
2013-02-04 12:05 ` rguenth at gcc dot gnu.org
2013-02-04 12:07 ` 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).