Bug 52875 - ADL failure + ICE in decltype
Summary: ADL failure + ICE in decltype
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-05 05:11 UTC by Dave Abrahams
Modified: 2014-05-17 20:24 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.10.0, 4.9.0
Known to fail:
Last reconfirmed: 2012-04-24 00:00:00


Attachments
reproducer (153 bytes, application/octet-stream)
2012-04-05 05:11 UTC, Dave Abrahams
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Abrahams 2012-04-05 05:11:41 UTC
Created attachment 27095 [details]
reproducer

I get:


y.cpp: In substitution of 'template<class T> decltype (swap(x.a, y.a)) swap(T&, T&) [with T = A]':
y.cpp:11:17:   required by substitution of 'template<class T> decltype (swap(x.a, y.a)) swap(T&, T&) [with T = B]'
y.cpp:20:14:   required from here
y.cpp:11:17: error: 'swap' was not declared in this scope
y.cpp:11:17: note: suggested alternative:
y.cpp:11:17: note:   'swap'
y.cpp: In substitution of 'template<class T> decltype (swap(x.a, y.a)) swap(T&, T&) [with T = A]':
y.cpp:11:17:   required from here
y.cpp:11:17: error: 'swap' was not declared in this scope
y.cpp:11:17: note: suggested alternative:
y.cpp:11:17: note:   'swap'
'
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrew Pinski 2012-04-24 04:04:59 UTC
Confirmed.
Comment 2 Paolo Carlini 2014-05-17 19:53:58 UTC
This is fixed in 4.8.3, 4.9.0 and trunk. I'm adding the testcase and closing the bug.
Comment 3 paolo@gcc.gnu.org 2014-05-17 20:23:02 UTC
Author: paolo
Date: Sat May 17 20:22:30 2014
New Revision: 210562

URL: http://gcc.gnu.org/viewcvs?rev=210562&root=gcc&view=rev
Log:
2014-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/52875
	* g++.dg/cpp0x/decltype58.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype58.C
Modified:
    trunk/gcc/testsuite/ChangeLog
Comment 4 Paolo Carlini 2014-05-17 20:24:13 UTC
This is fixed in 4.8.3, 4.9.0 and trunk. I'm adding the testcase and closing the bug.