summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/eh/div.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/eh/div.C')
-rw-r--r--gcc/testsuite/g++.dg/eh/div.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/eh/div.C b/gcc/testsuite/g++.dg/eh/div.C
new file mode 100644
index 000000000..14d7536ce
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/div.C
@@ -0,0 +1,13 @@
+// { dg-do link }
+// { dg-options "-Os" }
+/* PR target/28014: main references unsigned divide, and the unwinder
+ references signed divide.
+ If libgcc contains an object which defines both, and linking is done with
+ a space-optimized library that defines these functions in separate objects,
+ you end up with the function for unsigned divide defined twice. */
+int
+main (int c, char **argv)
+
+{
+ return 0xffffU/c;
+}