1// { dg-do compile }
2// { dg-options "-fabi-version=2" }
3
4// Copyright (C) 2003 Free Software Foundation, Inc.
5// Contributed by Nathan Sidwell 30 Nov 2003 <nathan@codesourcery.com>
6
7// PR 13241
8// mangled template arguments that are external objects incorrectly
9
10extern "C" void Foo ();
11namespace NMS
12{
13  extern "C" int V;
14}
15
16template <void (*)()> struct S {};
17template <int *> struct T {};
18
19void f (S<Foo>){}
20// { dg-final { scan-assembler "\n_?_Z1f1SIXadL_Z3FooEEE\[: \t\n\]" } }
21
22void g (T<&NMS::V>){}
23// { dg-final { scan-assembler "\n_?_Z1g1TIXadL_Z1VEEE\[: \t\n\]" } }
24