]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/69267 ([cilkplus] ICE when calling a function with an empty class as an...
authorRyan Burn <contact@rnburn.com>
Wed, 27 Jan 2016 17:17:23 +0000 (17:17 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 27 Jan 2016 17:17:23 +0000 (10:17 -0700)
2016-01-15  Ryan Burn  <contact@rnburn.com>

        PR cilkplus/69267
        * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
        gimplify_arg. Removed superfluous post_p argument.
        * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
        superfluous post_p argument.
        * c-gimplify.c (c_gimplify_expr): Likewise.

gcc/cp/ChangeLog:

2016-01-15  Ryan Burn  <contact@rnburn.com>

        PR cilkplus/69267
        * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
        superfluous post_p argument in call to
        cilk_gimplify_call_params_in_spawned_fn.

gcc/testsuite/ChangeLog:

2016-01-15  Ryan Burn  <contact@rnburn.com>

PR cilkplus/69267
* g++.dg/cilk-plus/CK/pr69267.cc: New test.

From-SVN: r232887

gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-gimplify.c
gcc/c-family/cilk.c
gcc/cp/ChangeLog
gcc/cp/cp-gimplify.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cilk-plus/CK/pr69267.cc [new file with mode: 0644]

index fdc96eabd7cf3ddcf78450e21fec26ddb6009abf..8c869896130ec691969f0c6cd8a86109129023fa 100644 (file)
@@ -1,3 +1,12 @@
+2016-01-27  Ryan Burn  <contact@rnburn.com>
+
+       PR cilkplus/69267
+       * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
+       gimplify_arg. Removed superfluous post_p argument.
+       * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
+       superfluous post_p argument.
+       * c-gimplify.c (c_gimplify_expr): Likewise.
+
 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
 
        PR other/69006
index 93e605b061dae36afd59f197c286917b6b8f349d..fa3746c3725034d083aa33506a71d189751ae8d1 100644 (file)
@@ -1449,8 +1449,7 @@ extern bool is_cilkplus_vector_p (tree);
 extern tree insert_cilk_frame (tree);
 extern void cilk_init_builtins (void);
 extern int gimplify_cilk_spawn (tree *);
-extern void cilk_gimplify_call_params_in_spawned_fn (tree *, gimple_seq *,
-                                                    gimple_seq *);
+extern void cilk_gimplify_call_params_in_spawned_fn (tree *, gimple_seq *);
 extern void cilk_install_body_with_frame_cleanup (tree, tree, void *);
 extern bool cilk_detect_spawn_and_unwrap (tree *);
 extern bool cilk_set_spawn_marker (location_t, tree);
index a5d348c3ed4e0855e3fdd08a6ef4843cd48fcb84..0757193beeabca08c30a2b85d93505647b49a886 100644 (file)
@@ -277,7 +277,7 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
 
       if (!seen_error ())
        {
-         cilk_gimplify_call_params_in_spawned_fn (expr_p, pre_p, post_p);
+         cilk_gimplify_call_params_in_spawned_fn (expr_p, pre_p);
          return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
        }
       return GS_ERROR;
@@ -292,7 +292,7 @@ c_gimplify_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED,
             it is supposed to be.  */
          && !seen_error ())
        {
-         cilk_gimplify_call_params_in_spawned_fn (expr_p, pre_p, post_p);
+         cilk_gimplify_call_params_in_spawned_fn (expr_p, pre_p);
          return (enum gimplify_status) gimplify_cilk_spawn (expr_p);
        }
 
index 4d6be33d818e35acb45eb502adf9e00d909ffed3..0b876b9fd6c3438527af051136a3ff760fd008b2 100644 (file)
@@ -779,8 +779,7 @@ create_cilk_wrapper (tree exp, tree *args_out)
    gimple sequences from the caller of gimplify_cilk_spawn.  */
 
 void
-cilk_gimplify_call_params_in_spawned_fn (tree *expr_p, gimple_seq *pre_p,
-                                        gimple_seq *post_p)
+cilk_gimplify_call_params_in_spawned_fn (tree *expr_p, gimple_seq *pre_p)
 {
   int ii = 0;
   tree *fix_parm_expr = expr_p;
@@ -797,8 +796,8 @@ cilk_gimplify_call_params_in_spawned_fn (tree *expr_p, gimple_seq *pre_p,
 
   if (TREE_CODE (*fix_parm_expr) == CALL_EXPR)
     for (ii = 0; ii < call_expr_nargs (*fix_parm_expr); ii++)
-      gimplify_expr (&CALL_EXPR_ARG (*fix_parm_expr, ii), pre_p, post_p,
-                    is_gimple_reg, fb_rvalue);
+      gimplify_arg (&CALL_EXPR_ARG (*fix_parm_expr, ii), pre_p,
+                   EXPR_LOCATION (*fix_parm_expr));
 }
 
 
index c8653c46f143cffecff1d7670b29942681a6068b..493b17afee32acf61c50b36af40754e5ff4e37ec 100644 (file)
@@ -1,3 +1,10 @@
+2016-01-27  Ryan Burn  <contact@rnburn.com>
+
+       PR cilkplus/69267
+       * cp-gimplify.c (cilk_cp_gimplify_call_params_in_spawned_fn): Removed
+       superfluous post_p argument in call to
+       cilk_gimplify_call_params_in_spawned_fn.
+
 2016-01-27  Marek Polacek  <polacek@redhat.com>
 
        PR c++/69379
index ce0975baac9e96b11d90b96f19340bd8a967b443..bb815340dddd9bb9f5027f45c1c7001961814681 100644 (file)
@@ -98,7 +98,7 @@ cilk_cp_gimplify_call_params_in_spawned_fn (tree *expr_p, gimple_seq *pre_p,
 {
   int ii = 0;
 
-  cilk_gimplify_call_params_in_spawned_fn (expr_p, pre_p, post_p);  
+  cilk_gimplify_call_params_in_spawned_fn (expr_p, pre_p);
   if (TREE_CODE (*expr_p) == AGGR_INIT_EXPR)
     for (ii = 0; ii < aggr_init_expr_nargs (*expr_p); ii++)
       gimplify_expr (&AGGR_INIT_EXPR_ARG (*expr_p, ii), pre_p, post_p,
index a7b0452cc0ca4eee8bfd6acdb6bca26f178f884b..98bb775ccac8ebdbe5d3b2a5d0da0723e28f4af2 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-27  Ryan Burn  <contact@rnburn.com>
+
+       PR cilkplus/69267
+       * g++.dg/cilk-plus/CK/pr69267.cc: New test.
+
 2016-01-27  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/69512
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/pr69267.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/pr69267.cc
new file mode 100644 (file)
index 0000000..7d00e49
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+struct A {};
+
+void f (A) {}
+
+void g () {
+  _Cilk_spawn f (A ());
+}