aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/pr34130.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr34130.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/pr34130.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr34130.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr34130.c
new file mode 100644
index 00000000..b528ff22
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/pr34130.c
@@ -0,0 +1,12 @@
+extern void abort (void);
+int foo (int i)
+{
+ return -2 * __builtin_abs(i - 2);
+}
+int main()
+{
+ if (foo(1) != -2
+ || foo(3) != -2)
+ abort ();
+ return 0;
+}