summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.dg/pr84100.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/falign-functions-2.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/falign-functions.c8
4 files changed, 48 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 736f01b8c40..930215d4949 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2018-07-04 Martin Liska <mliska@suse.cz>
+ PR middle-end/66240
+ PR target/45996
+ PR c/84100
+ * gcc.dg/pr84100.c (foo):
+ * gcc.target/i386/falign-functions-2.c: New test.
+ * gcc.target/i386/falign-functions.c: New test.
+
+2018-07-04 Martin Liska <mliska@suse.cz>
+
* gcc.dg/pr47793.c: Remove.
2018-07-04 Richard Sandiford <richard.sandiford@arm.com>
diff --git a/gcc/testsuite/gcc.dg/pr84100.c b/gcc/testsuite/gcc.dg/pr84100.c
index 86fbc4f7a3e..676d0c78dea 100644
--- a/gcc/testsuite/gcc.dg/pr84100.c
+++ b/gcc/testsuite/gcc.dg/pr84100.c
@@ -8,7 +8,7 @@ __attribute__((optimize ("align-loops=16", "align-jumps=16",
"align-labels=16", "align-functions=16")))
void
foo (void)
-{ /* { dg-bogus "bad option" } */
+{ /* { dg-warning "bad option" } */
for (int i = 0; i < 1024; ++i)
bar ();
}
diff --git a/gcc/testsuite/gcc.target/i386/falign-functions-2.c b/gcc/testsuite/gcc.target/i386/falign-functions-2.c
new file mode 100644
index 00000000000..26d505e3bea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/falign-functions-2.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -falign-functions=64:8" } */
+
+void
+a (void)
+{
+}
+
+#pragma GCC push_options
+#pragma GCC optimize "align-functions=128:100"
+void b (void)
+{
+}
+#pragma GCC pop_options
+
+void
+__attribute__((optimize("-falign-functions=88:88:32")))
+c (void)
+{
+}
+
+void
+d (void)
+{
+}
+
+/* { dg-final { scan-assembler-times ".p2align 6,,7" 2 } } */
+/* { dg-final { scan-assembler-times ".p2align 7,,99" 1 } } */
+/* { dg-final { scan-assembler-times ".p2align 7,,87" 1 } } */
+/* { dg-final { scan-assembler-times ".p2align 5" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/falign-functions.c b/gcc/testsuite/gcc.target/i386/falign-functions.c
new file mode 100644
index 00000000000..27daa1d0e6b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/falign-functions.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -falign-functions=64:8" } */
+/* { dg-final { scan-assembler ".p2align 6,,7" } } */
+
+void
+test_func (void)
+{
+}