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 target/24672] New: ICE on missing parentheses for constructor


The following invalid code snippet (which is similar to PR 22257)
causes an ICE on x86-64:

=============================
struct A
{
    int i, j;
    A : i(), j() {}
};
=============================

bug.cc:4: error: 'A::i' cannot appear in a constant-expression
bug.cc:4: error: a function call cannot appear in a constant-expression
bug.cc:4: error: name 'A' has incomplete type
bug.cc:4: error: declaration of 'A A::j()'
bug.cc:3: error: conflicts with previous declaration 'int A::j'
bug.cc: In member function 'A A::j()':
bug.cc:4: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in classify_argument, at config/i386/i386.c:2653
Please submit a full bug report, [etc.]

Since classify_argument is a x86_64-specific function, the ICE doesn't
appear on i686. So it's target dependent.
OTOH it might be a frontend bug that we end up in classify_argument at all
with invalid data.


-- 
           Summary: ICE on missing parentheses for constructor
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
 BugsThisDependsOn: 19964,22257


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


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