Bug 50658 - [4.7 regression] SIGSEGV in tree-flow-inline.h:562
Summary: [4.7 regression] SIGSEGV in tree-flow-inline.h:562
Status: RESOLVED DUPLICATE of bug 50638
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.7.0
: P1 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 16:45 UTC by gee
Modified: 2011-10-11 11:08 UTC (History)
1 user (show)

See Also:
Host: i686-pc-cygwin
Target: i686-pc-cygwin
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed:


Attachments
preprocessed source (8.46 KB, application/octet-stream)
2011-10-07 16:45 UTC, gee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gee 2011-10-07 16:45:39 UTC
Created attachment 25440 [details]
preprocessed source

$ gdb --args /tmp/gcc/host-i686-pc-cygwin/gcc/cc1plus.exe -quiet -nostdinc++ -v -I /tmp/gcc/libstdc++-v3/../libgcc -I /tmp/gcc/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin -I /tmp/gcc/i686-pc-cygwin/libstdc++-v3/include -I /tmp/gcc/libstdc++-v3/libsupc++ -iprefix /tmp/gcc/host-i686-pc-cygwin/gcc/../lib/gcc/i686-pc-cygwin/4.7.0/ -isystem /tmp/gcc/host-i686-pc-cygwin/gcc/include -isystem /tmp/gcc/host-i686-pc-cygwin/gcc/include-fixed -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter /usr/i686-pc-cygwin/bin/../include/w32api -idirafter /usr/i686-pc-cygwin/bin/../../include/w32api -isystem /usr/i686-pc-cygwin/include -isystem /usr/i686-pc-cygwin/sys-include ../../.././libstdc++-v3/libsupc++/eh_globals.cc -quiet -dumpbase eh_globals.cc -mtune=generic -march=pentiumpro -auxbase-strip eh_globals.o -O2 -Wall -Wextra -Wwrite-strings -Wcast-qual -version -fno-implicit-templates -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=eh_globals.lo -o /tmp/ccF1jDqY.s
GNU gdb (GDB) 7.3.50.20110903-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...

warning: the current range check setting does not match the language.


warning: the current type check setting does not match the language.

Whether backtraces should continue past the entry point of a program is off.
Reading symbols from /tmp/gcc/host-i686-pc-cygwin/gcc/cc1plus.exe...rdone.
(gdb) r
Starting program: /tmp/gcc/host-i686-pc-cygwin/gcc/cc1plus.exe -quiet -nostdinc++ -v -I /tmp/gcc/libstdc++-v3/../libgcc -I /tmp/gcc/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin -I /tmp/gcc/i686-pc-cygwin/libstdc++-v3/include -I /tmp/gcc/libstdc++-v3/libsupc++ -iprefix /tmp/gcc/host-i686-pc-cygwin/gcc/../lib/gcc/i686-pc-cygwin/4.7.0/ -isystem /tmp/gcc/host-i686-pc-cygwin/gcc/include -isystem /tmp/gcc/host-i686-pc-cygwin/gcc/include-fixed -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter /usr/i686-pc-cygwin/bin/../include/w32api -idirafter /usr/i686-pc-cygwin/bin/../../include/w32api -isystem /usr/i686-pc-cygwin/include -isystem /usr/i686-pc-cygwin/sys-include ../../.././libstdc++-v3/libsupc++/eh_globals.cc -quiet -dumpbase eh_globals.cc -mtune=generic -march=pentiumpro -auxbase-strip eh_globals.o -O2 -Wall -Wextra -Wwrite-strings -Wcast-qual -version -fno-implicit-templates -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=eh_globals.lo -o /tmp/ccF1jDqY.s
[New Thread 4884.0x2ac]
warning: section .gnu_debuglink not found in /cygdrive/d/cygwin/bin/cygwin1.dbg
[New Thread 4884.0x170c]
GNU C++ (GCC) version 4.7.0 20111007 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.7.0 20111006 (experimental), GMP version 5.0.0, MPFR version 3.0.1-p4, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/i686-pc-cygwin/sys-include"
ignoring nonexistent directory "/tmp/gcc/host-i686-pc-cygwin/gcc/../lib/gcc/i686-pc-cygwin/4.7.0/include"
ignoring nonexistent directory "/tmp/gcc/host-i686-pc-cygwin/gcc/../lib/gcc/i686-pc-cygwin/4.7.0/include-fixed"
ignoring nonexistent directory "/tmp/gcc/host-i686-pc-cygwin/gcc/../lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/include"
ignoring duplicate directory "/usr/lib/gcc/i686-pc-cygwin/4.7.0/../../../../i686-pc-cygwin/include"
ignoring duplicate directory "/usr/include"
ignoring duplicate directory "/usr/i686-pc-cygwin/bin/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 /tmp/gcc/libstdc++-v3/../libgcc
 /tmp/gcc/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin
 /tmp/gcc/i686-pc-cygwin/libstdc++-v3/include
 /tmp/gcc/libstdc++-v3/libsupc++
 /tmp/gcc/host-i686-pc-cygwin/gcc/include
 /tmp/gcc/host-i686-pc-cygwin/gcc/include-fixed
 /usr/i686-pc-cygwin/include
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/include
 /usr/local/include
 /usr/lib/gcc/i686-pc-cygwin/4.7.0/include-fixed
 /usr/i686-pc-cygwin/bin/../include/w32api
End of search list.
GNU C++ (GCC) version 4.7.0 20111007 (experimental) (i686-pc-cygwin)
        compiled by GNU C version 4.7.0 20111006 (experimental), GMP version 5.0.0, MPFR version 3.0.1-p4, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: fbde8e792f2e18cb851b0f9e109d09b6

Program received signal SIGSEGV, Segmentation fault.
0x01163e90 in set_is_used (var=0x7fc3f180)
    at ../.././gcc/tree-flow-inline.h:562
562       ann->used = true;
(gdb) bt
#0  0x01163e90 in set_is_used (var=0x7fc3f180)
    at ../.././gcc/tree-flow-inline.h:562
#1  0x0116528d in mark_all_vars_used_1 (tp=0x7fc58504,
    walk_subtrees=0x49bc1b4, data=0x0) at ../.././gcc/tree-ssa-live.c:379
#2  0x007feeed in walk_tree_1 (tp=0x7fc58504,
    func=0x1164dd8 <mark_all_vars_used_1>, data=0x0, pset=0x0, lh=0)
    at ../.././gcc/tree.c:10457
#3  0x01166139 in mark_all_vars_used (expr_p=0x7fe43428, data=0x0)
    at ../.././gcc/tree-ssa-live.c:595
#4  0x01166b00 in remove_unused_locals () at ../.././gcc/tree-ssa-live.c:727
#5  0x00a12e60 in execute_function_todo (data=0x8000)
    at ../.././gcc/passes.c:1695
#6  0x00a12979 in do_per_function (callback=0xa12d72 <execute_function_todo>,
    data=0x8000) at ../.././gcc/passes.c:1548
#7  0x00a12fb4 in execute_todo (flags=0x8000) at ../.././gcc/passes.c:1741
#8  0x00a1380d in execute_one_pass (pass=0x1333960)
    at ../.././gcc/passes.c:2087
#9  0x00a13934 in execute_pass_list (pass=0x1333960)
    at ../.././gcc/passes.c:2119
#10 0x00d21c37 in tree_rest_of_compilation (fndecl=0x7fe1f400)
    at ../.././gcc/tree-optimize.c:420
#11 0x00a18d3f in cgraph_expand_function ()
#12 0x00a1ae15 in cgraph_optimize ()
---Type <return> to continue, or q <return> to quit---
#13 0x00a1b1ef in cgraph_finalize_compilation_unit ()
#14 0x005b09ad in cp_write_global_declarations ()
    at ../.././gcc/cp/decl2.c:4008
#15 0x00a5f896 in compile_file () at ../.././gcc/toplev.c:581
#16 0x00a6191a in do_compile () at ../.././gcc/toplev.c:1925
#17 0x00a61aa0 in toplev_main (argc=0x34, argv=0x2003a368)
    at ../.././gcc/toplev.c:2001
#18 0x0131a840 in main ()
#19 0x610088dc in _cygwin_exit_return ()
    at /tmp/winsup/winsup/cygwin/dcrt0.cc:897
#20 0x6100694d in call2 (buf=0x49bcd94, arg=<optimized out>,
    func=0x61007b00 <dll_crt0_1(void*)>, this=0x49bce64)
    at /tmp/winsup/winsup/cygwin/cygtls.cc:69
#21 _cygtls::call (func=0x61007b00 <dll_crt0_1(void*)>, arg=0x0)
    at /tmp/winsup/winsup/cygwin/cygtls.cc:62
Cannot access memory at address 0x57f
(gdb)
Comment 1 Michael Matz 2011-10-11 11:08:17 UTC
I'm pretty sure this is emutls too, at least I can't reproduce it anymore
with a cross with r179745.  Dup of PR50638.

*** This bug has been marked as a duplicate of bug 50638 ***