This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/23729] New: Segfault in tree-ssa-structalias.c:3620


When I compile the small program below at -O3 using the actual snapshot 
(20050902) I get a segmentation fault.

Michael Cieslinski

<file tc30.ii>

struct S02 { bool V01, V02; };

struct S03 {unsigned char V03;  int V04; };

struct S05 { static void F01 ( int &P01, void *P02, void *P03 );  };

struct S07 {};

struct S09 : public virtual S02 {};

struct S10 : public S09
{
    S10(int &P04, S07* P05, S05* P06, S03 &P07);
    void F02(S03 F02);
    S03 V05;
};

void S10::F02(S03 F02) { V05 = F02; }

void S05::F01(int &P04, void* P02, void* P03)
{
    S05 *P09 = (S05*)P02;
    S03 V06;
    S03 P07;
    S07 *P08 = (S07*)P03;
    S10 F03(P04, P08, P09, P07);
    S03 V07 = V06;
    F03.F02(V07);
}


gdb --args /usr/local/gcc41n/libexec/gcc/x86_64-unknown-linux-
gnu/4.1.0/cc1plus -fpreprocessed tc30.ii -quiet -dumpbase tc30.ii
 -march=opteron -auxbase tc30 -O3 -version -o /tmp/ccSlWYjS.s
GNU gdb Red Hat Linux (6.1post-1.20040607.33rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db 
library "/lib64/tls/libthread_db.so.1".

(gdb) r
Starting program: /usr/local/gcc41n/libexec/gcc/x86_64-unknown-linux-
gnu/4.1.0/cc1plus -fpreprocessed tc30.ii -quiet -dumpbase tc30.ii
 -march=opteron -auxbase tc30 -O3 -version -o /tmp/ccSlWYjS.s
GNU C++ version 4.1.0 20050902 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.1.0 20050902 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: c772a89a64c04e63a9fcce637d556c0c

Program received signal SIGSEGV, Segmentation fault.
do_structure_copy (lhsop=Variable "lhsop" is not available.
) at ../../gcc-4.1-20050902/gcc/tree-ssa-structalias.c:2320
2320          temprhs.var = q->id;
(gdb) where
#0  do_structure_copy (lhsop=Variable "lhsop" is not available.
) at ../../gcc-4.1-20050902/gcc/tree-ssa-structalias.c:2320
#1  0x000000000086ebd2 in find_func_aliases (t=0x2a9571ab90, ai=Variable "ai" 
is not available.
) at ../../gcc-4.1-20050902/gcc/tree-ssa-structalias.c:2808
#2  0x0000000000870682 in compute_points_to_sets (ai=0xcdad40) at ../../gcc-4.1-
20050902/gcc/tree-ssa-structalias.c:3620
#3  0x0000000000580daa in compute_may_aliases () at ../../gcc-4.1-
20050902/gcc/tree-ssa-alias.c:263
#4  0x000000000085403c in execute_one_pass (pass=0xc0cfe0) at ../../gcc-4.1-
20050902/gcc/passes.c:808
#5  0x000000000085416c in execute_pass_list (pass=0xc0cfe0) at ../../gcc-4.1-
20050902/gcc/passes.c:840
#6  0x000000000085417e in execute_pass_list (pass=0xc0caa0) at ../../gcc-4.1-
20050902/gcc/passes.c:841
#7  0x000000000054c0f5 in tree_rest_of_compilation (fndecl=0x2a956fee00) 
at ../../gcc-4.1-20050902/gcc/tree-optimize.c:419
#8  0x00000000004cad08 in expand_body (fn=0x2a956fee00) at ../../gcc-4.1-
20050902/gcc/cp/semantics.c:3010
#9  0x0000000000898cf6 in cgraph_expand_function (node=0x2a957118f0) 
at ../../gcc-4.1-20050902/gcc/cgraphunit.c:1037
#10 0x000000000089ae0b in cgraph_optimize () at ../../gcc-4.1-
20050902/gcc/cgraphunit.c:1103
#11 0x000000000047b8cf in cp_finish_file () at ../../gcc-4.1-
20050902/gcc/cp/decl2.c:3103
#12 0x00000000005250ba in c_common_parse_file 
(set_yydebug=Variable "set_yydebug" is not available.
) at ../../gcc-4.1-20050902/gcc/c-opts.c:1117
#13 0x0000000000827aee in toplev_main (argc=Variable "argc" is not available.
) at ../../gcc-4.1-20050902/gcc/toplev.c:971
#14 0x0000003ef781bf6a in __libc_start_main () from /lib64/tls/libc.so.6
#15 0x000000000040260a in _start ()

-- 
           Summary: Segfault in tree-ssa-structalias.c:3620
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: micis at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23729


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]