public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51223] New: [4.5/4.6/4.7 Regression] ICE with invalid function parameter
@ 2011-11-19 19:34 reichelt at gcc dot gnu.org
  2011-12-05 14:15 ` [Bug c++/51223] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-11-19 19:34 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51223
           Summary: [4.5/4.6/4.7 Regression] ICE with invalid function
                    parameter
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


The following invalid code snippet triggers an ICE since GCC 4.5.0:

==========================
struct A
{
  A foo(void i = 0);
};

void bar()
{
  A().foo();
}

A A::foo(void i)
{
  return A();
}
==========================

bug.cc:3:18: error: 'i' has incomplete type
bug.cc:3:19: error: invalid use of 'void'
bug.cc: In function 'void bar()':
bug.cc:8:11: error: call to 'A A::foo(<type error>)' uses the default argument
for parameter 1, which is not yet defined
bug.cc: At global scope:
bug.cc:11:15: error: 'i' has incomplete type
bug.cc:11:16: error: invalid use of 'void'
bug.cc: In function 'void bar()':
bug.cc:8:11: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1460
Please submit a full bug report, [etc.]


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

end of thread, other threads:[~2012-01-24 10:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-19 19:34 [Bug c++/51223] New: [4.5/4.6/4.7 Regression] ICE with invalid function parameter reichelt at gcc dot gnu.org
2011-12-05 14:15 ` [Bug c++/51223] " rguenth at gcc dot gnu.org
2011-12-06 14:03 ` rguenth at gcc dot gnu.org
2012-01-01 22:14 ` pinskia at gcc dot gnu.org
2012-01-23 18:58 ` paolo.carlini at oracle dot com
2012-01-24 10:51 ` paolo at gcc dot gnu.org
2012-01-24 10:55 ` [Bug c++/51223] [4.5/4.6 " paolo.carlini at oracle dot com

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).