re PR middle-end/83977 (ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184)
authorJakub Jelinek <jakub@redhat.com>
Thu, 25 Jan 2018 15:32:02 +0000 (16:32 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 25 Jan 2018 15:32:02 +0000 (16:32 +0100)
PR middle-end/83977
* ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
on functions with #pragma omp declare simd or functions with simd
attribute.
* omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
Remove trailing \n from warning_at calls.

* c-c++-common/gomp/pr83977-1.c: Add -w to dg-options.

From-SVN: r257051

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/ipa-fnsummary.c
gcc/omp-simd-clone.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/gomp/pr83977-1.c

index 69cbcc691667c84acab9e5af26f2122683979047..65ef87ad44b3a51a83e552acbd80e78bf863f8fc 100644 (file)
@@ -1,3 +1,13 @@
+2018-01-25  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/83977
+       * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
+       on functions with #pragma omp declare simd or functions with simd
+       attribute.
+       * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
+       * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
+       Remove trailing \n from warning_at calls.
+
 2018-01-25  Tom de Vries  <tom@codesourcery.com>
 
        PR target/84028
index cd681687895444295d615a547eba70de83fcf3e1..6a49c1a161014443f9e3eb57047ed593f06ab36e 100644 (file)
@@ -50224,7 +50224,7 @@ ix86_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node,
        break;
       default:
        warning_at (DECL_SOURCE_LOCATION (node->decl), 0,
-                   "unsupported return type %qT for simd\n", ret_type);
+                   "unsupported return type %qT for simd", ret_type);
        return 0;
       }
 
@@ -50246,7 +50246,7 @@ ix86_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node,
        break;
       default:
        warning_at (DECL_SOURCE_LOCATION (node->decl), 0,
-                   "unsupported argument type %qT for simd\n", TREE_TYPE (t));
+                   "unsupported argument type %qT for simd", TREE_TYPE (t));
        return 0;
       }
 
index d45efafd389d70b34c04f70c4fc78da670830cca..bdf9ba1c9215253906ff34d02938ec0b1b0c28f7 100644 (file)
@@ -2467,7 +2467,11 @@ compute_fn_summary (struct cgraph_node *node, bool early)
         info->inlinable = tree_inlinable_function_p (node->decl);
 
        /* Type attributes can use parameter indices to describe them.  */
-       if (TYPE_ATTRIBUTES (TREE_TYPE (node->decl)))
+       if (TYPE_ATTRIBUTES (TREE_TYPE (node->decl))
+          /* Likewise for #pragma omp declare simd functions or functions
+             with simd attribute.  */
+          || lookup_attribute ("omp declare simd",
+                               DECL_ATTRIBUTES (node->decl)))
         node->local.can_change_signature = false;
        else
         {
index fbcb92ba76fc8b8bfa84d042888861460091e6a6..b7737a258248fbe20967bc1e2d7f961592ef93a0 100644 (file)
@@ -1574,10 +1574,6 @@ expand_simd_clones (struct cgraph_node *node)
   tree attr = lookup_attribute ("omp declare simd",
                                DECL_ATTRIBUTES (node->decl));
   if (attr == NULL_TREE
-      /* Ignore artificial decls with an abstract origin, results of function
-        cloning, versioning etc.  We want to handle certain builtins
-        with simd attribute, like __builtin_sin.  */
-      || (DECL_ARTIFICIAL (node->decl) && DECL_ABSTRACT_ORIGIN (node->decl))
       || node->global.inlined_to
       || lookup_attribute ("noclone", DECL_ATTRIBUTES (node->decl)))
     return;
index 42665a2c64ec1f9df197b7ce4d605924b74aebe9..8493bcdadd63403d19da1ecf58493588f0b62e09 100644 (file)
@@ -1,3 +1,8 @@
+2018-01-25  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/83977
+       * c-c++-common/gomp/pr83977-1.c: Add -w to dg-options.
+
 2018-01-25  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * gcc.dg/vect/vect-reduc-or_1.c: Require whole_vector_shift for
index 9941db49469fbd2a68265a3e91cd0c313ec6f13d..bcc42ddbb81d17e94244510b88c96611cba72851 100644 (file)
@@ -1,6 +1,6 @@
 /* PR middle-end/83977 */
 /* { dg-do compile } */
-/* { dg-additional-options "-O2" } */
+/* { dg-additional-options "-O2 -w" } */
 
 struct S { int a, b, c; };