public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50939] New: [C++0x] lambda expression causes ICE when lambda captures const variable and odr-uses the variable in function templates
@ 2011-11-01  3:54 gwtnb0 at gmail dot com
  2011-11-01  9:59 ` [Bug c++/50939] " redi at gcc dot gnu.org
  2013-02-27 16:29 ` paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: gwtnb0 at gmail dot com @ 2011-11-01  3:54 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50939
           Summary: [C++0x] lambda expression causes ICE when lambda
                    captures const variable and odr-uses the variable in
                    function templates
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gwtnb0@gmail.com


Compiling the following code generates ICE:
===
template <typename T>
void foo(T x)
{
    int const a = x;
    [&]{ return &a; }();
}

int main()
{
    foo(100);
}
===
$ g++ -std=c++0x lambda.cc
lambda.cc: In lambda function:
lambda.cc:5:21: internal compiler error: in make_decl_rtl, at varasm.c:1163
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.archlinux.org/> for instructions.
===


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

* [Bug c++/50939] [C++0x] lambda expression causes ICE when lambda captures const variable and odr-uses the variable in function templates
  2011-11-01  3:54 [Bug c++/50939] New: [C++0x] lambda expression causes ICE when lambda captures const variable and odr-uses the variable in function templates gwtnb0 at gmail dot com
@ 2011-11-01  9:59 ` redi at gcc dot gnu.org
  2013-02-27 16:29 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2011-11-01  9:59 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-01
     Ever Confirmed|0                           |1
      Known to fail|                            |4.6.2, 4.7.0


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

* [Bug c++/50939] [C++0x] lambda expression causes ICE when lambda captures const variable and odr-uses the variable in function templates
  2011-11-01  3:54 [Bug c++/50939] New: [C++0x] lambda expression causes ICE when lambda captures const variable and odr-uses the variable in function templates gwtnb0 at gmail dot com
  2011-11-01  9:59 ` [Bug c++/50939] " redi at gcc dot gnu.org
@ 2013-02-27 16:29 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-02-27 16:29 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |4.7.3, 4.8.0
         Resolution|                            |FIXED

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-02-27 16:29:07 UTC ---
This is fixed mainline and 4.7.3.


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

end of thread, other threads:[~2013-02-27 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-01  3:54 [Bug c++/50939] New: [C++0x] lambda expression causes ICE when lambda captures const variable and odr-uses the variable in function templates gwtnb0 at gmail dot com
2011-11-01  9:59 ` [Bug c++/50939] " redi at gcc dot gnu.org
2013-02-27 16:29 ` 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).