aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-11-10 11:08:03 +0100
committerRichard Biener <rguenther@suse.de>2021-11-10 11:09:56 +0100
commitb2cd32b743ba440e75505ce30c6b5c592ed144ea (patch)
treee82718ec109a448ea7f553bab4b84989c0409f0d /gcc
parent0f68560161deb000149a59931dfe5bca60af92d8 (diff)
downloadgcc-b2cd32b743ba440e75505ce30c6b5c592ed144ea.zip
gcc-b2cd32b743ba440e75505ce30c6b5c592ed144ea.tar.gz
gcc-b2cd32b743ba440e75505ce30c6b5c592ed144ea.tar.bz2
testsuite/102690 - XFAIL g++.dg/warn/Warray-bounds-16.C
This XFAILs the bogus diagnostic test and rectifies the expectation on the optimization. 2021-11-10 Richard Biener <rguenther@suse.de> PR testsuite/102690 * g++.dg/warn/Warray-bounds-16.C: XFAIL diagnostic part and optimization.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/warn/Warray-bounds-16.C6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
index 17b4d0d..89cbadb 100644
--- a/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
+++ b/gcc/testsuite/g++.dg/warn/Warray-bounds-16.C
@@ -19,11 +19,11 @@ struct S
p = (int*) new unsigned char [sizeof (int) * m];
for (int i = 0; i < m; i++)
- new (p + i) int ();
+ new (p + i) int (); /* { dg-bogus "bounds" "pr102690" { xfail *-*-* } } */
}
};
S a (0);
-/* Verify the loop has been eliminated.
- { dg-final { scan-tree-dump-not "goto" "optimized" } } */
+/* The loop cannot be eliminated since the global 'new' can change 'm'. */
+/* { dg-final { scan-tree-dump-not "goto" "optimized" { xfail *-*-* } } } */