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/47944] New: Several graphite tests SEGV on Solaris 10/x86


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

           Summary: Several graphite tests SEGV on Solaris 10/x86
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
                CC: spop@gcc.gnu.org
              Host: i386-pc-solaris2.10
            Target: i386-pc-solaris2.10
             Build: i386-pc-solaris2.10


I've recently started trying to bootstrap/test mainline with graphite.  I'm
using
ppl-0.11.1 built with g++ 4.4.2 (-g -O2) or g++ 4.5.2 (-g3 -O0) on Solaris
9/x86
and cloog-parma-0.16.1 built with g++ 4.4.2 (-g -O2).  All support libraries
(ppl, cloog, gmpxx) are built statically.

Unfortunately, several graphite tests SEGV in this configuration, e.g.

FAIL: gcc.dg/graphite/id-14.c (internal compiler error)
FAIL: gcc.dg/graphite/id-14.c (test for excess errors)

I get

$ cc1 id-14.i -quiet -O2 -fgraphite-identity
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/graphite/id-14.c: In function
'foo':
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/graphite/id-14.c:7:1: internal
compiler error: Segmentation Fault

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
Parma_Polyhedra_Library::Constraint_System::insert (this=0x804705c, c=...)
    at /vol/gcc/src/ppl/ppl-0.11.1/src/Constraint_System.cc:244
244       if (topology() == c.topology())
(gdb) where
#0  Parma_Polyhedra_Library::Constraint_System::insert (this=0x804705c, c=...)
    at /vol/gcc/src/ppl/ppl-0.11.1/src/Constraint_System.cc:244
#1  0x08ab5991 in
Parma_Polyhedra_Library::Constraint_System::add_low_level_constraints
(this=0x804705c, topol=Parma_Polyhedra_Library::NECESSARILY_CLOSED, 
    num_dimensions=1, kind=Parma_Polyhedra_Library::UNIVERSE)
    at /vol/gcc/src/ppl/ppl-0.11.1/src/Constraint_System.inlines.hh:184
#2  Polyhedron (this=0x804705c, 
    topol=Parma_Polyhedra_Library::NECESSARILY_CLOSED, num_dimensions=1, 
    kind=Parma_Polyhedra_Library::UNIVERSE)
    at /vol/gcc/src/ppl/ppl-0.11.1/src/Polyhedron_nonpublic.cc:63
#3  0x08a79668 in C_Polyhedron (pph=0x9021fe8, d=1, empty=0)
    at ../../src/ppl.hh:38014
#4  Pointset_Powerset (pph=0x9021fe8, d=1, empty=0) at ../../src/ppl.hh:14498
#5  ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension (
    pph=0x9021fe8, d=1, empty=0) at ppl_c_Pointset_Powerset_C_Polyhedron.cc:76
#6  0x08936db4 in find_scop_parameters (scop=0x9021fd0)
    at /vol/gcc/src/hg/trunk/local/gcc/graphite-sese-to-poly.c:951
#7  build_poly_scop (scop=0x9021fd0)
    at /vol/gcc/src/hg/trunk/local/gcc/graphite-sese-to-poly.c:3285
#8  0x0891efcc in graphite_transform_loops ()
    at /vol/gcc/src/hg/trunk/local/gcc/graphite.c:268
#9  0x085ad427 in graphite_transforms ()
    at /vol/gcc/src/hg/trunk/local/gcc/tree-ssa-loop.c:256
#10 0x08411fa4 in execute_one_pass (pass=0x8e60d20)
    at /vol/gcc/src/hg/trunk/local/gcc/passes.c:1556
#11 0x084122bd in execute_pass_list (pass=0x8e60d20)
    at /vol/gcc/src/hg/trunk/local/gcc/passes.c:1611
#12 0x084122d0 in execute_pass_list (pass=0x8e60d60)
    at /vol/gcc/src/hg/trunk/local/gcc/passes.c:1612 
#13 0x084122d0 in execute_pass_list (pass=0x8e60ee0)
    at /vol/gcc/src/hg/trunk/local/gcc/passes.c:1612
#14 0x084122d0 in execute_pass_list (pass=0x8e605e0)
    at /vol/gcc/src/hg/trunk/local/gcc/passes.c:1612
#15 0x0851997a in tree_rest_of_compilation (fndecl=0xfedf3500)
    at /vol/gcc/src/hg/trunk/local/gcc/tree-optimize.c:422
#16 0x086e20e6 in cgraph_expand_function (node=0xfed76540)
    at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1576
#17 0x086e4c95 in cgraph_expand_all_functions ()
    at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1635
#18 cgraph_optimize () at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1899
#19 0x086e52d5 in cgraph_finalize_compilation_unit ()
    at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:1096
#20 0x08139df8 in c_write_global_declarations ()
    at /vol/gcc/src/hg/trunk/local/gcc/c-decl.c:9872
#21 0x084bba55 in compile_file (argc=5, argv=0x80475c4)
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:591
#22 do_compile (argc=5, argv=0x80475c4)
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:1900
#23 toplev_main (argc=5, argv=0x80475c4)
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:1963
#24 0x08b9542b in main (argc=5, argv=0x80475c4)
    at /vol/gcc/src/hg/trunk/local/gcc/main.c:36

The problem is that Parma_Polyhedra_Library::Constraint_System::insert is
called with c = NULL.

Roberto Bagnara gave the essential hint: before the SEGV, there are two calls
to
ppl_initialize

#0  ppl_initialize ()
    at
/vol/gcc/src/ppl/ppl-0.11.1/interfaces/C/ppl_c_implementation_common.cc:182
#1  0x0891ee96 in graphite_initialize ()
    at /vol/gcc/src/hg/trunk/local/gcc/graphite.c:206
#2  graphite_transform_loops ()
    at /vol/gcc/src/hg/trunk/local/gcc/graphite.c:252
#3  0x085ad427 in graphite_transforms ()

#0  ppl_initialize ()
    at
/vol/gcc/src/ppl/ppl-0.11.1/interfaces/C/ppl_c_implementation_common.cc:182
#1  0x089f6b45 in cloog_state_malloc ()
#2  0x09008aa0 in ?? ()
#3  0x0891efed in graphite_transform_loops ()
    at /vol/gcc/src/hg/trunk/local/gcc/graphite.c:272
#4  0x085ad427 in graphite_transforms ()

and one call to ppl_finalize:

#0  ppl_finalize ()
    at
/vol/gcc/src/ppl/ppl-0.11.1/interfaces/C/ppl_c_implementation_common.cc:246
#1  0x0892239d in gloog (scop=0x9008aa0, bb_pbb_mapping=0x90321c0)
    at /vol/gcc/src/hg/trunk/local/gcc/graphite-clast-to-gimple.c:1580
#2  0x0891efed in graphite_transform_loops ()
    at /vol/gcc/src/hg/trunk/local/gcc/graphite.c:272
#3  0x085ad427 in graphite_transforms ()

He stated that this is guaranteed not to work.


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