2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / debug / debug4.C
blob8dceb0875bf81b8dd339c1d673d06251010aee39
1 /* PR debug/5770
2    This testcase failed at -O -g because the following constants
3    were optimized away since they were never referenced, but
4    since they are variables with initializers, rtl_for_decl_location
5    run expand_expr on their initializers and returned it.
6    This lead to references to constants which were deferred and thus
7    never emitted.  */
8 /* { dg-do link } */
10 static const char foo[] = "foo string";
11 static const char bar[30] = "bar string";
12 static const wchar_t baz[] = L"baz string";
14 int
15 main ()