summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/weak3.C
blob: 360821acc48623d67d4ce1b19929787d9460a6b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/20961
// Test for #pragma weak and __attribute__((weak)) being used together. 
// { dg-do compile }
// { dg-require-weak "" }
// { dg-options "" }

// { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?_Z3foov" } }

int foo ();
#pragma weak foo

int
__attribute__((weak))
foo ()
{
  return 0;
}