diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2003-11-10 08:32:16 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@gcc.gnu.org> | 2003-11-10 08:32:16 +0000 |
commit | 64323f62a668e5e88d0efae2eec9165d0d4fb8da (patch) | |
tree | 438670b86a1e7bbfb313f955d4b0d7ff755576c5 /gcc/testsuite | |
parent | 1ec0c6076c33fa776614e7efb44f0d0cafa85d51 (diff) | |
download | gcc-64323f62a668e5e88d0efae2eec9165d0d4fb8da.zip gcc-64323f62a668e5e88d0efae2eec9165d0d4fb8da.tar.gz gcc-64323f62a668e5e88d0efae2eec9165d0d4fb8da.tar.bz2 |
re PR c++/12832 (ICE: tree check: expected class 'd', have 'x' (error_mark) in location_of, at cp/error.c:1962)
PR c++/12832
* name-lookup.c (supplement_binding): Gracefully handle names
used at non-class scope prior declaration.
From-SVN: r73406
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.dg/lookup/used-before-declaration.C | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/used-before-declaration.C b/gcc/testsuite/g++.dg/lookup/used-before-declaration.C new file mode 100644 index 0000000..c1469ea --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/used-before-declaration.C @@ -0,0 +1,5 @@ +// Copyroght (C) 2003 Free Software Foundation +// Origin: PR/12832, Jonathan Wakely <redi@gcc.gnu.org> + +void f() { g(); } // { dg-error "undeclared" "" } +void g() { } // { dg-error "used" "" } |