aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/Wdeprecated-non-prototype-5.c14
-rw-r--r--gcc/testsuite/gcc.dg/c2y-named-loops-8.c5
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Wdeprecated-non-prototype-5.c b/gcc/testsuite/gcc.dg/Wdeprecated-non-prototype-5.c
new file mode 100644
index 0000000..b231a74
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wdeprecated-non-prototype-5.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-Wdeprecated-non-prototype" } */
+
+static inline
+int f (int x)
+{
+ return __builtin_constant_p (x);
+}
+
+static inline
+int g (double x)
+{
+ return __builtin_isfinite (x);
+}
diff --git a/gcc/testsuite/gcc.dg/c2y-named-loops-8.c b/gcc/testsuite/gcc.dg/c2y-named-loops-8.c
new file mode 100644
index 0000000..8d69db4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c2y-named-loops-8.c
@@ -0,0 +1,5 @@
+/* PR c/119317 - Named loops (C2y) did not compile with -O1 and -ggdb2 or higher */
+/* { dg-do compile } */
+/* { dg-options "-std=c2y -O1 -ggdb2" } */
+
+#include "c2y-named-loops-1.c"