Bug 64848 - G++ internal compiler error with templated lambdas capturing variable
Summary: G++ internal compiler error with templated lambdas capturing variable
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.9.2
: P3 normal
Target Milestone: 5.2
Assignee: Not yet assigned to anyone
URL:
Keywords: c++-lambda, ice-on-valid-code
Depends on:
Blocks: lambdas
  Show dependency treegraph
 
Reported: 2015-01-28 21:24 UTC by Lazarus
Modified: 2022-03-11 00:32 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.8.2, 4.9.1, 5.0
Last reconfirmed: 2015-02-02 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lazarus 2015-01-28 21:24:05 UTC
Hello everyone,

i encountered this error while extending my program:
I tested gcc 4.8.4 and 4.9.2 with the same result.

For a fairly simple code snippit causing that error, please visit:
http://stackoverflow.com/questions/28202334/gcc-g-internal-error-c-templated-lambda

Thanks,
Lazarus
Comment 1 Ville Voutilainen 2015-02-02 14:27:48 UTC
Clang accepts the code.
Comment 2 Paolo Carlini 2015-07-10 02:40:04 UTC
This is fixed for 5.2. I'm adding a testcase and closing the bug.
Comment 3 paolo@gcc.gnu.org 2015-07-10 02:45:12 UTC
Author: paolo
Date: Fri Jul 10 02:44:39 2015
New Revision: 225648

URL: https://gcc.gnu.org/viewcvs?rev=225648&root=gcc&view=rev
Log:
2015-07-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/64848
	* g++.dg/cpp0x/lambda/lambda-ice14.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice14.C
Modified:
    trunk/gcc/testsuite/ChangeLog
Comment 4 Paolo Carlini 2015-07-10 02:46:26 UTC
Done.