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]

c/2765: File-scope division by zero causes segfault



>Number:         2765
>Category:       c
>Synopsis:       File-scope division by zero causes segfault
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 07 11:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     neil@gcc.gnu.org
>Release:        GCC 3.0 (20010506)
>Organization:
>Environment:

>Description:
Compile the following line:-

int i = 8/0;

I've marked this high since it's a regression from 2.95.2.
I believe it's a C front end bug, although the segfault
is caused in gen_emit_rtl, which dereferences a null
pointer (cfunc).  We should probably not have proceeded
that far, though I don't know the right place.

Possibly
	pedwarn ("initializer element is not computable at load time");
in digest_init should also have
        inside_init = error_mark_node;
but this is probably covering up the real problem.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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