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 c++/25417] New: internal compiler error in check_initializer; hits clisp


This small testcase is extracted from clisp, and throws an ICE:
-------------------------------
struct object {
  int a;
  int b;
};

void f (int c, int d)
{
  object o = ((object){ a : c, b : d});
}
--------------------------------

% g++ -c bla.ii
bla.ii: In function ‘void f(int, int)’:
bla.ii:8: internal compiler error: in check_initializer, at cp/decl.c:4613

Removing the explicit cast and the surrounding parentheses, i.e. to read like
so:
    object o = { a : c, b : d};
makes this compile.


-- 
           Summary: internal compiler error in check_initializer; hits clisp
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: matz at suse dot de
  GCC host triplet: ia64-linux


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


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