aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr40570.c22
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr41016.c17
2 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr40570.c b/gcc/testsuite/gcc.c-torture/compile/pr40570.c
new file mode 100644
index 00000000000..7c3f4d83b2e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr40570.c
@@ -0,0 +1,22 @@
+extern void anything(int);
+
+static int foo(int i);
+
+static int bar(int i) { foo(i); }
+
+extern int j;
+
+static int foo(int i)
+{
+ if (j)
+ anything(j);
+ return bar(i);
+}
+
+int baz()
+{
+ foo(0);
+ if (baz())
+ return 1;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41016.c b/gcc/testsuite/gcc.c-torture/compile/pr41016.c
new file mode 100644
index 00000000000..57bddb49dea
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41016.c
@@ -0,0 +1,17 @@
+typedef struct _IO_FILE FILE;
+void
+CompareRNAStructures (FILE * ofp, int start, int L, char *ss_true, char *ss)
+{
+ int i;
+ float agree = 0.;
+ float pairs = 0.;
+ float pairs_true = 0.;
+ for (i = 0; i < L; i++)
+ {
+ pairs_true += 1.;
+ agree += 1.;
+ }
+ if (((int) pairs % 2 != 0) || ((int) pairs_true % 2 != 0)
+ || ((int) agree % 2 != 0))
+ Die ("Error in CompareRNAStrutures(); odd number of paired nucleotides\n");
+}