aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C
index e1cc8534c8d..ce1efe0c731 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate12.C
@@ -48,3 +48,13 @@ int main ()
return 9;
return 0;
}
+
+// On platforms that do not have weak symbols, these static data
+// members must be explicitly instantiated. The iflag and jflag data
+// members should not have to be explicitly instantiated because their
+// const-ness should allow the compiler to elide references to the
+// actual variables.
+template const bool X<int>::cflag;
+template const bool X<int>::flag;
+template const bool X<float>::cflag;
+template const bool X<float>::flag;