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

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).