public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52487] New: [4.6/4.7 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value
@ 2012-03-04 22:34 hevanen at googlemail dot com
  2012-03-05 10:14 ` [Bug c++/52487] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hevanen at googlemail dot com @ 2012-03-04 22:34 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52487
           Summary: [4.6/4.7 Regression] [C++11] ICE at
                    cp/semantics.c:5613 with lambda capturing reference to
                    incomplete type by value
    Classification: Unclassified
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hevanen@googlemail.com


The following code snippet causes an ICE:

struct A;
void foo(A& a)
{
  [=](){a;};
}

int main() {}


Confirmed with
gcc version 4.6.1 20110409 (prerelease) (Ubuntu 4.6.0-3~ppa1) and
GNU C++ (niXman build) version 4.7.0 20120203 (experimental) (i686-pc-mingw32)

The latter prints:
internal compiler error: in literal_type_p, at cp/semantics.c:5613

There is no ICE with this version:
GNU C++ (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (x86_64-linux-gnu)
Instead, it prints the expected error message ("invalid use of incomplete type
‘struct A’").


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

* [Bug c++/52487] [4.6/4.7/4.8 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value
  2012-03-04 22:34 [Bug c++/52487] New: [4.6/4.7 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value hevanen at googlemail dot com
@ 2012-03-05 10:14 ` rguenth at gcc dot gnu.org
  2012-03-20 14:12 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-05 10:14 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-03-05
   Target Milestone|---                         |4.6.4
            Summary|[4.6/4.7 Regression]        |[4.6/4.7/4.8 Regression]
                   |[C++11] ICE at              |[C++11] ICE at
                   |cp/semantics.c:5613 with    |cp/semantics.c:5613 with
                   |lambda capturing reference  |lambda capturing reference
                   |to incomplete type by value |to incomplete type by value
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-05 10:13:39 UTC ---
Confirmed.


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

* [Bug c++/52487] [4.6/4.7/4.8 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value
  2012-03-04 22:34 [Bug c++/52487] New: [4.6/4.7 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value hevanen at googlemail dot com
  2012-03-05 10:14 ` [Bug c++/52487] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
@ 2012-03-20 14:12 ` paolo.carlini at oracle dot com
  2012-03-23  0:59 ` paolo at gcc dot gnu.org
  2012-03-23  1:05 ` [Bug c++/52487] [4.6 " paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-03-20 14:12 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-03-20 14:04:23 UTC ---
Looking into it.


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

* [Bug c++/52487] [4.6/4.7/4.8 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value
  2012-03-04 22:34 [Bug c++/52487] New: [4.6/4.7 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value hevanen at googlemail dot com
  2012-03-05 10:14 ` [Bug c++/52487] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
  2012-03-20 14:12 ` paolo.carlini at oracle dot com
@ 2012-03-23  0:59 ` paolo at gcc dot gnu.org
  2012-03-23  1:05 ` [Bug c++/52487] [4.6 " paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-03-23  0:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-03-23 00:58:15 UTC ---
Author: paolo
Date: Fri Mar 23 00:58:10 2012
New Revision: 185723

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185723
Log:
/cp
2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/52487
    * class.c (check_field_decls): Call literal_type_p only
    on complete types.

/testsuite
2012-03-22  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/52487
    * g++.dg/cpp0x/lambda/lambda-ice7.C: New.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/class.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/52487] [4.6 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value
  2012-03-04 22:34 [Bug c++/52487] New: [4.6/4.7 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value hevanen at googlemail dot com
                   ` (2 preceding siblings ...)
  2012-03-23  0:59 ` paolo at gcc dot gnu.org
@ 2012-03-23  1:05 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-03-23  1:05 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.1
            Summary|[4.6/4.7/4.8 Regression]    |[4.6 Regression] [C++11]
                   |[C++11] ICE at              |ICE at cp/semantics.c:5613
                   |cp/semantics.c:5613 with    |with lambda capturing
                   |lambda capturing reference  |reference to incomplete
                   |to incomplete type by value |type by value

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-03-23 00:59:37 UTC ---
Fixed 4.7.1 and mainline.


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

end of thread, other threads:[~2012-03-23  0:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-04 22:34 [Bug c++/52487] New: [4.6/4.7 Regression] [C++11] ICE at cp/semantics.c:5613 with lambda capturing reference to incomplete type by value hevanen at googlemail dot com
2012-03-05 10:14 ` [Bug c++/52487] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2012-03-20 14:12 ` paolo.carlini at oracle dot com
2012-03-23  0:59 ` paolo at gcc dot gnu.org
2012-03-23  1:05 ` [Bug c++/52487] [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).