[Bug fortran/88377] New: ICE in gfc_omp_clause_copy_ctor, at fortran/trans-openmp.c:614

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/88377] New: ICE in gfc_omp_clause_copy_ctor, at fortran/trans-openmp.c:614

msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88377

            Bug ID: 88377
           Summary: ICE in gfc_omp_clause_copy_ctor, at
                    fortran/trans-openmp.c:614
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: [hidden email]
  Target Milestone: ---

Affects versions down to at least gfortran-5 :


$ cat z1.f90
program p
   call s(3)
contains
   subroutine s(n)
      integer :: n
      character(n), allocatable :: x
      x = 'abc'
      !$omp task
      print *, x, (x == 'abc')
      !$omp end task
   end
end


$ gfortran-9-20181202 z1.f90 -static-libgfortran
$ a.out
 abc T


$ gfortran-9-20181202 -c z1.f90 -fopenmp
during GIMPLE pass: omplower
z1.f90:8:0:

    8 |       !$omp task
      |
internal compiler error: Segmentation fault
0xb2ec9f crash_signal
        ../../gcc/toplev.c:326
0x72193c gfc_omp_clause_copy_ctor(tree_node*, tree_node*, tree_node*)
        ../../gcc/fortran/trans-openmp.c:614
0xa3b08f lower_rec_input_clauses
        ../../gcc/omp-low.c:4880
0xa3eb36 lower_omp_taskreg
        ../../gcc/omp-low.c:8965
0xa346b6 lower_omp_1
        ../../gcc/omp-low.c:10405
0xa346b6 lower_omp
        ../../gcc/omp-low.c:10495
0xa35529 lower_omp_1
        ../../gcc/omp-low.c:10331
0xa35529 lower_omp
        ../../gcc/omp-low.c:10495
0xa3544e lower_omp_1
        ../../gcc/omp-low.c:10339
0xa3544e lower_omp
        ../../gcc/omp-low.c:10495
0xa3929b execute_lower_omp
        ../../gcc/omp-low.c:10537
0xa3929b execute
        ../../gcc/omp-low.c:10584
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/88377] ICE in gfc_omp_clause_copy_ctor, at fortran/trans-openmp.c:614

msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88377

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2018-12-06
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 45172
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45172&action=edit
gcc9-pr88377.patch

Untested fix.
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/88377] ICE in gfc_omp_clause_copy_ctor, at fortran/trans-openmp.c:614

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88377

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Dec  6 23:29:04 2018
New Revision: 266879

URL: https://gcc.gnu.org/viewcvs?rev=266879&root=gcc&view=rev
Log:
        PR fortran/88377
        * trans-openmp.c (gfc_omp_clause_default_ctor,
        gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
        gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
        GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
        have pointer type.

        * gfortran.dg/gomp/pr88377.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/gomp/pr88377.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-openmp.c
    trunk/gcc/testsuite/ChangeLog
Reply | Threaded
Open this post in threaded view
|

[Bug fortran/88377] ICE in gfc_omp_clause_copy_ctor, at fortran/trans-openmp.c:614

msebor at gcc dot gnu.org
In reply to this post by msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88377

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on GCC trunk so far.