aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil K Pandey <skpgkp2@gmail.com>2020-07-24 14:08:41 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-07-24 14:17:44 -0700
commit07c70c29affe7c6d01ab37cc7bc725fd1351f668 (patch)
tree5b1c699a9a4732d6c2f9bc43951bf0fc0067465c
parent49341f3bd40220172c199aee7d4ff0a19ecc46d8 (diff)
downloadgcc-07c70c29affe7c6d01ab37cc7bc725fd1351f668.zip
gcc-07c70c29affe7c6d01ab37cc7bc725fd1351f668.tar.gz
gcc-07c70c29affe7c6d01ab37cc7bc725fd1351f668.tar.bz2
Add testcase to show kernel issue got fixed by pr95237 [PR96192]
This test case, extracted from PR 95645, was failing because alignment of local long long variable got lowered from 8 bytes to 4 bytes in adjust alignment pass, which triggered assert failure. This test case passes now because PR 95237 fix only allows lowering of alignment of local variables in the front end. As a result, alignment of local long long variable no longer gets lowered in adjust alignment pass. gcc/testsuite/ChangeLog: PR target/96192 * c-c++-common/pr96192-1.c: New test.
-rw-r--r--gcc/testsuite/c-c++-common/pr96192-1.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/pr96192-1.c b/gcc/testsuite/c-c++-common/pr96192-1.c
new file mode 100644
index 0000000..4d9be06
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr96192-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-mpreferred-stack-boundary=2 -Os -w" } */
+
+int a;
+
+long long
+b (void)
+{
+}
+
+void
+c (void)
+{
+ if (b())
+ a = 1;
+}