summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-27 10:34:13 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-27 10:34:13 +0000
commit487282d5a4f4548c4354e5ee53c5ca75119d3244 (patch)
treeb703e1bca4342e3b953ea7bf89353df6f93a550f /gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c
parentb0ec32b91ee4957d4b172b99e28436ce5c00d3fa (diff)
downloadgcc-487282d5a4f4548c4354e5ee53c5ca75119d3244.tar.gz
2012-04-27 Marc Glisse <marc.glisse@inria.fr>
PR middle-end/27139 * tree-ssa-forwprop.c (combine_conversions): Handle INT->FP->INT. * gcc.dg/tree-ssa/forwprop-18.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186898 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c
new file mode 100644
index 00000000000..2c4d120e999
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-forwprop1" } */
+
+signed char f1(signed char n)
+{
+ return (long double)n;
+}
+unsigned long long f2(signed char n)
+{
+ return (long double)n;
+}
+
+unsigned long long g1(unsigned long long n)
+{
+ return (float)n;
+}
+signed char g2(unsigned long long n)
+{
+ return (float)n;
+}
+
+/* { dg-final { scan-tree-dump-times "\\\(float\\\)" 2 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-not "\\\(long double\\\)" "forwprop1" } } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */