aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/pr58419.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr58419.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/pr58419.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr58419.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr58419.c
new file mode 100644
index 00000000..d0441f27
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/pr58419.c
@@ -0,0 +1,41 @@
+__attribute__((__noinline__))
+void
+dummy ()
+{
+ asm volatile("");
+}
+
+int a, g, i, k, *p;
+signed char b;
+char e;
+short c, h;
+static short *d = &c;
+
+char
+foo (int p1, int p2)
+{
+ return p1 - p2;
+}
+
+int
+bar ()
+{
+ short *q = &c;
+ *q = 1;
+ *p = 0;
+ return 0;
+}
+
+int
+main ()
+{
+ for (b = -22; b >= -29; b--)
+ {
+ short *l = &h;
+ char *m = &e;
+ *l = a;
+ g = foo (*m = k && *d, 1 > i) || bar ();
+ }
+ dummy();
+ return 0;
+}