public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/10471: [3.3?/3.4 regression] SegFault in build_cxx_call
@ 2003-04-23 22:06 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-04-23 22:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10471
>Category:       c++
>Synopsis:       [3.3?/3.4 regression] SegFault in build_cxx_call
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 23 22:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Wolfgang Bangerth
>Release:        unknown-1.0
>Organization:
>Environment:
present mainline
>Description:
This broke our nightly builds yesterday:
-----------------
struct X {
    X ();
};

template <int> struct O {
    struct I {
        I (const X & = X());
    };
};
template struct O<2>;
-----------------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc
y.cc: In constructor `O<<anonymous> >::I::I(const X&) [with int <anonymous> =
   2]':
y.cc:6:   instantiated from `O<2>::I'
y.cc:10:   instantiated from here
y.cc:6: internal compiler error: Segmentation fault

The ICE happens here:
(gdb) bt
#0  0x080566b2 in build_cxx_call (fn=0x4015dda0, args=0x401a9154, 
    converted_args=0x401a9168) at ../../gcc-3.4-CVS/gcc/cp/call.c:4741
#1  0x080557ea in build_over_call (cand=0x40180c34, flags=3)
    at ../../gcc-3.4-CVS/gcc/cp/call.c:4710
#2  0x08057760 in build_new_method_call (instance=0x401a9140, fns=0x401a0ec4, 
    args=0x0, conversion_path=0x401a2fc0, flags=3)
    at ../../gcc-3.4-CVS/gcc/cp/call.c:5158
#3  0x080bbf39 in build_functional_cast (exp=0x401a03cc, parms=0x0)
    at ../../gcc-3.4-CVS/gcc/cp/typeck2.c:1239
#4  0x0809f44d in tsubst_default_argument (fn=0x401a03cc, type=0x0, 
    arg=0x401a03cc) at ../../gcc-3.4-CVS/gcc/cp/pt.c:5830
#5  0x0809f5b3 in tsubst_default_arguments (fn=0x401a03cc)
    at ../../gcc-3.4-CVS/gcc/cp/pt.c:5862

Mark, I bet this is the patch that caused this:
----------------------------
revision 1.377
date: 2003/04/22 05:44:07;  author: mmitchel;  state: Exp;  lines: +26 -4
	* Makefile.in (calls.o): Depend on except.h.
	* calls.c: Include except.h.
	(emit_call_1): Call note_eh_region_may_contain_throw if
	appropriate.
	* except.c (eh_region): Add may_contain_throw.
	(expand_eh_region_end_cleanup): Do not include handler code when
	it cannot be reached.
	(note_eh_region_may_contain_throw): New function.
	* except.h (note_eh_region_may_contain_throw): New function.

	* call.c (build_over_call): Use build_cxx_call.
	(build_cxx_call): New method, split out of build_over_call.
	* cp-tree.h (language_function): Add can_throw.
	(build_cxx_call): Declare it.
	* decl.c (finish_function): If a function does not contain any
	calls to functions that can throw an exception, indicate that
	fact.
	* decl2.c (mark_used): Do not defer the instantiation of
	functions, if the current function does not throw.
	* optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
	* pt.c (instantiate_decl): Make sure import_export_decl is called
	before emitting things.
	* rtti.c (throw_bad_cast): Use build_cxx_call.
	(build_dynamic_cast_1): Likewise.
	* typeck.c (build_function_call): Likewise.

Can you take a look? The patch also seems to be on the
3.3 branch, but I don't have a recent enough build to
actually check that the same happens there.

Thanks
  Wolfgang
>How-To-Repeat:

>Fix:

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/10471: [3.3?/3.4 regression] SegFault in build_cxx_call
@ 2003-04-24  6:02 mmitchel
  0 siblings, 0 replies; 3+ messages in thread
From: mmitchel @ 2003-04-24  6:02 UTC (permalink / raw)
  To: bangerth, gcc-bugs, gcc-prs, mmitchel

Synopsis: [3.3?/3.4 regression] SegFault in build_cxx_call

State-Changed-From-To: open->closed
State-Changed-By: mmitchel
State-Changed-When: Thu Apr 24 06:02:40 2003
State-Changed-Why:
    Fixed in GCC 3.3, GCC 3.4.

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/10471: [3.3?/3.4 regression] SegFault in build_cxx_call
@ 2003-04-23 22:10 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2003-04-23 22:10 UTC (permalink / raw)
  To: bangerth, gcc-bugs, gcc-prs, mmitchel, nobody

Synopsis: [3.3?/3.4 regression] SegFault in build_cxx_call

Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-By: bangerth
Responsible-Changed-When: Wed Apr 23 22:10:15 2003
Responsible-Changed-Why:
    Likely your patch

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-24  6:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-23 22:06 c++/10471: [3.3?/3.4 regression] SegFault in build_cxx_call bangerth
2003-04-23 22:10 bangerth
2003-04-24  6:02 mmitchel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).