I just tried to compile the following code

void f( int, ...);

struct S
{
};

void
g()
{
        void f( int, ...);

        S t;

        f( 1, t);
}

void
f( int i, ...)
{
}

with GNU C compiler version 4.5 snapshot 20090409
and the compiler said

jul17c.cc: In function 'void g()':
jul17c.cc:15: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

This C++ source code used to work with the 20090402 snapshot.

Here is valgrind helping out with a stack backtrace

Invalid read of size 8
==15025==    at 0x40791E: joust (call.c:6802)
==15025==    by 0x4080DA: tourney (call.c:6896)
==15025==    by 0x40BCF3: perform_overload_resolution (call.c:2979)
==15025==    by 0x416AE5: build_new_function_call (call.c:3019)
==15025==    by 0x50B4EF: finish_call_expr (semantics.c:1994)
==15025==    by 0x4BBEB3: cp_parser_postfix_expression (parser.c:4825)
==15025==    by 0x4BC7B3: cp_parser_unary_expression (parser.c:5577)
==15025==    by 0x4BD08C: cp_parser_binary_expression (parser.c:6233)
==15025==    by 0x4BD473: cp_parser_assignment_expression (parser.c:6421)
==15025==    by 0x4BD89F: cp_parser_expression (parser.c:6566)
==15025==    by 0x4BDC33: cp_parser_expression_statement (parser.c:7129)
==15025==    by 0x4B684A: cp_parser_statement (parser.c:7019)
==15025==  Address 0x10 is not stack'd, malloc'd or (recently) free'd


-- 
           Summary: ice in C++ overload resolution
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: x86_64-suse-linux


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

Reply via email to