re PR tree-optimization/79908 (ICE in gimplify_expr (gimplify.c:12155) gimplification...
authorWilliam Schmidt <wschmidt@gcc.gnu.org>
Thu, 23 Mar 2017 13:13:44 +0000 (13:13 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Thu, 23 Mar 2017 13:13:44 +0000 (13:13 +0000)
[gcc]

2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
            Richard Biener  <rguenth@suse.com>

PR tree-optimization/79908
PR tree-optimization/80136
* tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
been cast away, gimplify_and_add suffices.

[gcc/testsuite]

2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
            Richard Biener  <rguenther@suse.de>

PR tree-optimization/79908
PR tree-optimization/80136
* gcc.dg/torture/pr79908.c: New file.

From-SVN: r246418

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr79908.c
gcc/tree-stdarg.c

index 7135acce58a1273e47c94c87a7bde6219bd070ad..091d78ab739cbb3bf52f2539cdb999e8b4c76963 100644 (file)
@@ -1,3 +1,11 @@
+2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+            Richard Biener  <rguenth@suse.com>
+
+       PR tree-optimization/79908
+       PR tree-optimization/80136
+       * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
+       been cast away, gimplify_and_add suffices.
+
 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de> 
 
        * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
index 555671f7d6afeab7193bb8729155dbf081d3b6c7..257c5ce832abffc44d0e93e091b42e1bb9b864c7 100644 (file)
@@ -1,6 +1,13 @@
+2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+            Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/79908
+       PR tree-optimization/80136
+       * gcc.dg/torture/pr79908.c: New file.
+
 2017-03-22 Nicolas Koenig <koenigni@student.ethz.ch>
 
-       PR fortran/39239        
+       PR fortran/39239
        * gfortran.dg/equiv_constraint_bind_c.f90: New test.
 
 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e2d6920a4cda00d34a56a2acdefbb6398ba8f81b 100644 (file)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+/* Used to fail in the stdarg pass before fix for PR79908.  */
+
+typedef __builtin_va_list __gnuc_va_list;
+typedef __gnuc_va_list va_list;
+
+void testva (int n, ...)
+{
+  va_list ap;
+  _Complex int i = __builtin_va_arg (ap, _Complex int);
+}
index 8972822f5b7d38fdb66d8261639d72b97d56f878..923b315e79e17d008ffff9370394a68efad0f0e1 100644 (file)
@@ -1058,7 +1058,7 @@ expand_ifn_va_arg_1 (function *fun)
            gimplify_assign (lhs, expr, &pre);
          }
        else
-         gimplify_expr (&expr, &pre, &post, is_gimple_lvalue, fb_lvalue);
+         gimplify_and_add (expr, &pre);
 
        input_location = saved_location;
        pop_gimplify_context (NULL);