aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-03-25 11:43:03 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-03-25 11:43:03 +0000
commit40b0722fa3de25b33ea751f3dbd0ed69dddc8f7a (patch)
treed60f9c2b1e610c029be48cafa5a1956a12ea3999
parent4a5798de3eabbe16398c11dcdb4cead64299d212 (diff)
downloadgcc-40b0722fa3de25b33ea751f3dbd0ed69dddc8f7a.zip
gcc-40b0722fa3de25b33ea751f3dbd0ed69dddc8f7a.tar.gz
gcc-40b0722fa3de25b33ea751f3dbd0ed69dddc8f7a.tar.bz2
re PR lto/60635 (ICE when mixing C and Fortran lto1: error: use operand missing for stmt)
2014-03-25 Richard Biener <rguenther@suse.de> PR middle-end/60635 * gimplify-me.c (gimple_regimplify_operands): Update the re-gimplifed stmt. * gfortran.dg/lto/pr60635_0.f90: New testcase. * gfortran.dg/lto/pr60635_1.c: Likewise. From-SVN: r208811
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gimplify-me.c2
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.dg/lto/pr60635_0.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/lto/pr60635_1.c14
5 files changed, 44 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7cfbab7..3da0621 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60635
+ * gimplify-me.c (gimple_regimplify_operands): Update the
+ re-gimplifed stmt.
+
2014-03-25 Martin Jambor <mjambor@suse.cz>
PR ipa/59176
diff --git a/gcc/gimplify-me.c b/gcc/gimplify-me.c
index bee6e3e..05e986a 100644
--- a/gcc/gimplify-me.c
+++ b/gcc/gimplify-me.c
@@ -315,6 +315,8 @@ gimple_regimplify_operands (gimple stmt, gimple_stmt_iterator *gsi_p)
gsi_insert_after (gsi_p, post_stmt, GSI_NEW_STMT);
pop_gimplify_context (NULL);
+
+ update_stmt (stmt);
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9f9422a..c3f985e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/60635
+ * gfortran.dg/lto/pr60635_0.f90: New testcase.
+ * gfortran.dg/lto/pr60635_1.c: Likewise.
+
2014-03-24 Adam Butcher <adam@jessamine.co.uk>
PR c++/60627
diff --git a/gcc/testsuite/gfortran.dg/lto/pr60635_0.f90 b/gcc/testsuite/gfortran.dg/lto/pr60635_0.f90
new file mode 100644
index 0000000..e121879
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/lto/pr60635_0.f90
@@ -0,0 +1,16 @@
+! { dg-lto-do link }
+program test
+ use iso_fortran_env
+
+ interface
+ integer(int16) function bigendc16(x) bind(C)
+ import
+ integer(int16), intent(in) :: x
+ end function
+ end interface
+
+ integer(int16) :: x16 = 12345
+ x16 = bigendc16(x16)
+ print *,x16
+end program
+
diff --git a/gcc/testsuite/gfortran.dg/lto/pr60635_1.c b/gcc/testsuite/gfortran.dg/lto/pr60635_1.c
new file mode 100644
index 0000000..eddc569
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/lto/pr60635_1.c
@@ -0,0 +1,14 @@
+#include <stdint.h>
+#include <stdbool.h>
+
+static bool littleendian=true;
+
+uint16_t bigendc16(union{uint16_t * n;uint8_t* b;}x){
+
+ if (!littleendian) return *x.n;
+
+ uint16_t res = ((uint16_t)(x.b[1])<<0) |
+ ((uint16_t)(x.b[0])<<8);
+ return res;
+}
+