summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/pr20931.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/pr20931.C')
-rw-r--r--gcc/testsuite/g++.dg/opt/pr20931.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/pr20931.C b/gcc/testsuite/g++.dg/opt/pr20931.C
new file mode 100644
index 000000000..01518c06d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr20931.C
@@ -0,0 +1,13 @@
+// PR middle-end
+// This testcase ICEd because fold checking saw a type change which
+// is allowed as TYPE_CONTAINS_PLACEHOLDER_INTERNAL could change.
+// { dg-do compile }
+// { dg-options "-O2" }
+
+int
+__finite (double __x) throw ()
+{
+ return (__extension__
+ (((((union { double __d; int __i[2]; }) {__d: __x}).__i[1]
+ | 0x800fffffu) + 1) >> 31));
+}