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]

Re: c/6815: [3.2/3.3 regression] ICE with longjmp if -fprofile-arcs -O is specified


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6815

These messages on gcc@gcc.gnu.org are about the same problem. This mail
is mainly meant to make sure that this information is attached to the
audit trail of PR 6815:

http://gcc.gnu.org/ml/gcc/2002-12/msg00377.html
http://gcc.gnu.org/ml/gcc/2002-12/msg00378.html
http://gcc.gnu.org/ml/gcc/2002-12/msg00458.html
http://gcc.gnu.org/ml/gcc/2002-12/msg00475.html

Citing rth in one of theses mails:
| Before the invocation of the profiling routines, no successors is correct.
| During the invocation of the profiling routines, however, we add fake 
| edges from calls to the exit block.  I would not expect this to change
| for a noreturn function like longjmp.
|
| So I guess the quesion is "where did you get this null, exactly?"

The crash is in cfgrtl.c:1314 in function insert_insn_on_edge in this
piece of code:

| void
| insert_insn_on_edge (pattern, e)
|      rtx pattern;
|      edge e;
| {
|   /* We cannot insert instructions on an abnormal critical edge.
|      It will be easier to find the culprit if we die now.  */
|   if ((e->flags & EDGE_ABNORMAL) && EDGE_CRITICAL_P (e))
|     abort ();
| [ ... ]

where e is NULL. insert_insn_on_edge in turn is called from
flow_call_edges_add in cfganal.c:325 with this piece of code:

| for (e = bb->succ; e; e = e->succ_next)
|   if (e->dest == EXIT_BLOCK_PTR)
|     break;
|
| insert_insn_on_edge (gen_rtx_USE (VOIDmode, const0_rtx), e);
| commit_edge_insertions ();

which looks a bit strange if we keep in mind that insert_insn_on_edge
will crash if the second parameter is NULL.

    regards  Christian

-- 
THAT'S ALL FOLKS!


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