I thought this was filed before but I cannot find it. Testcase: namespace std { namespace __gnu_debug { namespace debug = std::__gnu_debug; namespace debug { ----- Error we get: t.ii:6: error: namespace alias ‘std::__gnu_debug::debug’ not allowed here, assuming ‘std::__gnu_debug’ t.ii:6: internal compiler error: in resume_scope, at cp/name-lookup.c:1372 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Created attachment 10805 [details] patch
Comment on attachment 10805 [details] patch This patch was submitted to the wrong bug.
Confirmed. Even simpler testcase: ======================= namespace N { namespace M = N; namespace M {} } =======================
confirmed with 4.3.4 and 4.4.0
confirmed with trunk 20091228
On it.
Author: paolo Date: Fri Jun 1 16:11:38 2012 New Revision: 188113 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188113 Log: /cp 2012-06-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/26155 * name-lookup.c (push_namespace): When error recovery is impossible just error out in duplicate_decls. /testsuite 2012-06-01 Paolo Carlini <paolo.carlini@oracle.com> PR c++/26155 * g++.dg/parse/namespace-alias-1.C: New. Added: trunk/gcc/testsuite/g++.dg/parse/namespace-alias-1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/name-lookup.c trunk/gcc/testsuite/ChangeLog
Fixed.