11590Srgrimes// PR debug/54508
21590Srgrimes// { dg-do compile }
31590Srgrimes// { dg-options "-g2 -dA -fno-merge-debug-strings" }
41590Srgrimes
51590Srgrimes// { dg-final { scan-assembler "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
61590Srgrimes// { dg-final { scan-assembler "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
71590Srgrimes// { dg-final { scan-assembler "\"bi\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
81590Srgrimes// { dg-final { scan-assembler "\"si\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
91590Srgrimes// { dg-final { scan-assembler "\"f1\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
101590Srgrimes// { dg-final { scan-assembler "\"f2\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
111590Srgrimes// { dg-final { scan-assembler-not "\"nc\\\\0\"\[ \t\]+\# +DW_AT_name" } }
121590Srgrimes
131590Srgrimesclass cbase
141590Srgrimes
151590Srgrimes{
161590Srgrimespublic:
171590Srgrimes static int si;
181590Srgrimes    int bi;
191590Srgrimes};
201590Srgrimes
211590Srgrimesclass c : public cbase
221590Srgrimes
231590Srgrimes{
241590Srgrimespublic:
251590Srgrimes enum
261590Srgrimes {
271590Srgrimes  OPCODE = 251
281590Srgrimes };
291590Srgrimes int i ;
301590Srgrimes static const char *testc (void) { return "foo"; }
311590Srgrimes};
321590Srgrimes
331590Srgrimesstruct s
3441568Sarchie{
351590Srgrimes    int f1;
361590Srgrimes    static const char *tests (void) { return "test"; }
3787246Smarkm};
381590Srgrimes
3987628Sdwmaloneunion u
401590Srgrimes{
4187628Sdwmalone    int f2;
4229207Sjoerg    double d;
4387628Sdwmalone    static const char *testu (void) { return "test union"; }
441590Srgrimes};
4587628Sdwmalone
4687628Sdwmalonenamespace n
4787628Sdwmalone{
4827094Scharnier    const char *ntest (void) { return "test n"; }
491590Srgrimes
5052453Sache    class nc
51200604Sjh    {
52204896Sache    public:
531590Srgrimes        int i;
5478718Sdd        static int sj;
551590Srgrimes    };
5623690Speter}
57131497Stjr
58131497Stjrextern void send (int, int, const void *, int);
591590Srgrimes
60227235Sedvoid test (int src)
61227235Sed{
621590Srgrimes  int cookie = 1;
63227235Sed  send(src, c::OPCODE, c::testc (), cookie);
64227235Sed  send(src, c::OPCODE, s::tests (), cookie);
65227235Sed  send(src, c::OPCODE, u::testu (), cookie);
6692920Simp  send(src, c::OPCODE, n::ntest (), cookie);
671590Srgrimes}
681590Srgrimes