]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add 'g++.target/nvptx/alias-g++.dg_init_dtor2-2.C'
authorThomas Schwinge <tschwinge@baylibre.com>
Tue, 18 Mar 2025 15:18:54 +0000 (16:18 +0100)
committerThomas Schwinge <tschwinge@baylibre.com>
Tue, 25 Mar 2025 08:11:00 +0000 (09:11 +0100)
... next to '-malias' variant: commit a1865fd33897bc6c6e0109df0a12ee73ce386315
"Add 'g++.target/nvptx/alias-g++.dg_init_dtor2-1.C'", to document what we're
doing to '-mno-alias'.

gcc/testsuite/
* g++.target/nvptx/alias-g++.dg_init_dtor2-2.C: New.

(cherry picked from commit f7f6a3dd8251421f873dc99be4acb70ae277d509)

gcc/testsuite/ChangeLog.omp
gcc/testsuite/g++.target/nvptx/alias-g++.dg_init_dtor2-2.C [new file with mode: 0644]

index 45c57dbcf2dc60a0dcf5dc5aefe196d1998aa26c..ca18867353601f7e2ae2dbea23b2a37c703cbd24 100644 (file)
@@ -3,6 +3,11 @@
        Backported from trunk:
        2025-03-21  Thomas Schwinge  <tschwinge@baylibre.com>
 
+       * g++.target/nvptx/alias-g++.dg_init_dtor2-2.C: New.
+
+       Backported from trunk:
+       2025-03-21  Thomas Schwinge  <tschwinge@baylibre.com>
+
        * gcc.target/nvptx/alias-unsupported-1.c: New.
 
 2025-03-21  Paul-Antoine Arras  <parras@baylibre.com>
diff --git a/gcc/testsuite/g++.target/nvptx/alias-g++.dg_init_dtor2-2.C b/gcc/testsuite/g++.target/nvptx/alias-g++.dg_init_dtor2-2.C
new file mode 100644 (file)
index 0000000..f00575e
--- /dev/null
@@ -0,0 +1,33 @@
+/* Reduced from 'g++.dg/init/dtor2.C'.  */
+
+/* { dg-do link } */
+/* { dg-additional-options -mno-alias } */
+/* { dg-additional-options -save-temps } */
+/* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient.  */
+
+struct B
+{
+  ~B();
+};
+
+B::~B () {
+}
+
+int main()
+{
+  B b;
+  return 0;
+}
+
+/* { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DECL: _ZN1BD2Ev$} 1 } }
+   { dg-final { scan-assembler-times {(?n)^\.visible \.func _ZN1BD2Ev \(\.param\.u64 %in_ar0\);$} 1 } }
+   { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DEF: _ZN1BD2Ev$} 1 } }
+   { dg-final { scan-assembler-times {(?n)^\.visible \.func _ZN1BD2Ev \(\.param\.u64 %in_ar0\)$} 1 } } */
+
+/* { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DECL: _ZN1BD1Ev$} 1 } }
+   { dg-final { scan-assembler-times {(?n)^\.visible \.func _ZN1BD1Ev \(\.param\.u64 %in_ar0\);$} 1 } }
+   { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DEF: _ZN1BD1Ev$} 1 } }
+   { dg-final { scan-assembler-times {(?n)^\.visible \.func _ZN1BD1Ev \(\.param\.u64 %in_ar0\)$} 1 } } */
+
+/* { dg-final { scan-assembler-times {(?n)\tcall _ZN1BD1Ev, \(} 1 } }
+   { dg-final { scan-assembler-times {(?n)\tcall _ZN1BD2Ev, \(} 0 } } */