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/70700] New: ICE using -fdump-tree-all-graph option


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70700

            Bug ID: 70700
           Summary: ICE using -fdump-tree-all-graph option
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Reported by t.w. lefering by email:
------------------------------------------------------------
Using GCC snapshot gcc-6-20160410.tar.bz2 and the
-fdump-tree-all-graph option to generate graph data
internal gcc error happens when compiling Linux sparse:

parse.c:1362:22: internal compiler error: in operator[], at vec.h:714

in tree-ssa-structalias.c line 1212 is build_pred_graph()

at line 1229 the get_varinfo() using vec.h routines hits the internal compiler
error:

for (j = 1; j < FIRST_REF_NODE; j++)
{
  if (!get_varinfo (j)->is_special_var)
    bitmap_set_bit (graph->direct_nodes, j);
}

Looks like the variable j gets out-of-range then hit this assert in vec.h:714

in vec.h:

template<typename T, typename A>
inline T &
vec<T, A, vl_embed>::operator[] (unsigned ix)
{
  gcc_checking_assert (ix < m_vecpfx.m_num);
  return m_vecdata[ix];
}

And this is in the generated output:

parse.c: In function 'const_qualifier':
parse.c:1362:22: internal compiler error: in operator[], at vec.h:714
 static struct token *const_qualifier(struct token *next, struct decl_state
*ctx)
                      ^~~~~~~~~~~~~~~
0xce89e7 vec<variable_info*, va_heap, vl_embed>::operator[](unsigned int)
        ../.././gcc/vec.h:714
0xce89e7 vec<variable_info*, va_heap, vl_ptr>::operator[](unsigned int)
        ../.././gcc/vec.h:1180
0xce89e7 get_varinfo
        ../.././gcc/tree-ssa-structalias.c:333
0xcf7cd7 get_varinfo
        ../.././gcc/vec.h:714
0xcf7cd7 build_pred_graph
        ../.././gcc/tree-ssa-structalias.c:1231
0xcf7cd7 solve_constraints
        ../.././gcc/tree-ssa-structalias.c:6961
0xcf9593 compute_points_to_sets
        ../.././gcc/tree-ssa-structalias.c:7062
0xcf9593 compute_may_aliases()
        ../.././gcc/tree-ssa-structalias.c:7389
0xa5afdc execute_function_todo
        ../.././gcc/passes.c:1930
0xa5baab execute_todo
        ../.././gcc/passes.c:2010
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.
------------------------------------------------------------

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