[Bug middle-end/83977] [8 Regression] ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184

2018-03-03 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83977

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Sat Mar  3 13:18:15 2018
New Revision: 258174

URL: https://gcc.gnu.org/viewcvs?rev=258174=gcc=rev
Log:
Backported from mainline
2018-01-24  Jakub Jelinek  

PR middle-end/83977
* tree-inline.c (tree_function_versioning): Remove "omp declare simd"
attributes from DECL_ATTRIBUTES (new_decl) without affecting
DECL_ATTRIBUTES (old_decl).

* c-c++-common/gomp/pr83977-1.c: New test.
* c-c++-common/gomp/pr83977-2.c: New test.
* c-c++-common/gomp/pr83977-3.c: New test.
* gfortran.dg/gomp/pr83977.f90: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/c-c++-common/gomp/pr83977-1.c
branches/gcc-7-branch/gcc/testsuite/c-c++-common/gomp/pr83977-2.c
branches/gcc-7-branch/gcc/testsuite/c-c++-common/gomp/pr83977-3.c
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/gomp/pr83977.f90
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/tree-inline.c

[Bug middle-end/83977] [8 Regression] ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184

2018-01-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83977

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Thu Jan 25 15:32:02 2018
New Revision: 257051

URL: https://gcc.gnu.org/viewcvs?rev=257051=gcc=rev
Log:
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.

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

[Bug middle-end/83977] [8 Regression] ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184

2018-01-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83977

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Jakub Jelinek  ---
Fixed.

[Bug middle-end/83977] [8 Regression] ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184

2018-01-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83977

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Wed Jan 24 16:28:47 2018
New Revision: 257023

URL: https://gcc.gnu.org/viewcvs?rev=257023=gcc=rev
Log:
PR middle-end/83977
* tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
here.
* omp-low.c (create_omp_child_function): Remove "omp declare simd"
attributes from DECL_ATTRIBUTES (decl) without affecting
DECL_ATTRIBUTES (current_function_decl).
* omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
functions with non-NULL DECL_ABSTRACT_ORIGIN.

* c-c++-common/gomp/pr83977-1.c: New test.
* c-c++-common/gomp/pr83977-2.c: New test.
* c-c++-common/gomp/pr83977-3.c: New test.
* gfortran.dg/gomp/pr83977.f90: New test.

Added:
trunk/gcc/testsuite/c-c++-common/gomp/pr83977-1.c
trunk/gcc/testsuite/c-c++-common/gomp/pr83977-2.c
trunk/gcc/testsuite/c-c++-common/gomp/pr83977-3.c
trunk/gcc/testsuite/gfortran.dg/gomp/pr83977.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/omp-low.c
trunk/gcc/omp-simd-clone.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c

[Bug middle-end/83977] [8 Regression] ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184

2018-01-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83977

--- Comment #3 from Jakub Jelinek  ---
Another related example:
struct S { int a, b, c; };

#pragma omp declare simd uniform(z) linear(v:1)
__attribute__((noinline)) static int
foo (int x, int y, struct S z, int u, int v)
{
  return x + y + z.a;
}

int
bar (int x, int y, int z)
{
  struct S s = { z, 1, 1 };
  return foo (x, y, s, 0, 0);
}

[Bug middle-end/83977] [8 Regression] ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184

2018-01-23 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83977

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Created attachment 43213
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43213=edit
gcc8-pr83977.patch

Untested fix.

[Bug middle-end/83977] [8 Regression] ICE in simd_clone_clauses_extract, at omp-simd-clone.c:184

2018-01-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83977

Richard Biener  changed:

   What|Removed |Added

   Keywords||openmp
   Priority|P3  |P1
  Component|fortran |middle-end