public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types
       [not found] <bug-92586-4@http.gcc.gnu.org/bugzilla/>
@ 2020-07-13 11:09 ` epagone at email dot it
  2021-09-29 18:46 ` epagone at email dot it
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: epagone at email dot it @ 2020-07-13 11:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586

--- Comment #9 from epagone <epagone at email dot it> ---
Bug persists in version 10.1:

$ gfortran-10 -v
Using built-in specs.
COLLECT_GCC=gfortran-10
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
10.1.0-3ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-10
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-10-0TNKLK/gcc-10-10.1.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-0TNKLK/gcc-10-10.1.0/debian/tmp-gcn/usr,hsa
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.1.0 (Ubuntu 10.1.0-3ubuntu1~20.04)

My MWE output:
$ gfortran-10 bug.f90 
bug.f90:34:0:

   34 |     data_get_foo_s = self%foo(ith)%get_s()
      | 
internal compiler error: in gimplify_expr, at gimplify.c:14624
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.

G. Steinmetz's reduced case "z1.f90":
$ gfortran-10 bug.f90 
bug.f90:19:0:

   19 |       f = g(x%c)
      | 
internal compiler error: in gimplify_expr, at gimplify.c:14624
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types
       [not found] <bug-92586-4@http.gcc.gnu.org/bugzilla/>
  2020-07-13 11:09 ` [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types epagone at email dot it
@ 2021-09-29 18:46 ` epagone at email dot it
  2023-08-24 17:57 ` pault at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: epagone at email dot it @ 2021-09-29 18:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586

--- Comment #10 from epagone <epagone at email dot it> ---
Bug persists in version 11.1.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types
       [not found] <bug-92586-4@http.gcc.gnu.org/bugzilla/>
  2020-07-13 11:09 ` [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types epagone at email dot it
  2021-09-29 18:46 ` epagone at email dot it
@ 2023-08-24 17:57 ` pault at gcc dot gnu.org
  2023-08-26 12:51 ` pault at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu.org @ 2023-08-24 17:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org

--- Comment #11 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to G. Steinmetz from comment #5)
> A simplification might be :
> 
> 
> $ cat z1.f90
> program p
>    type t
>       integer, allocatable :: a
>    end type
>    type t2
>       type(t) :: b
>    end type
>    type t3
>       type(t2) :: c
>    end type
> contains
>    function g(x)
>       class(t2) :: x
>       type(t) :: g(2)
>    end
>    function f(x)
>       class(t3) :: x
>       type(t) :: f(2)
>       f = g(x%c)
>    end
> end
> 
> 
> $ gfortran-10-20191215 -c z1.f90
> gimplification failed:
> &parm.14 <addr_expr 0x7f89646c6e40

The tree dump contains the obviously wrong:

....snip....
    struct array01_t parm.15;
....snip....
    if ((&parm.15).a != 0B)
      {
        __builtin_free ((void *) (&parm.15).a);
        (&parm.15).a = 0B;
      }

which is why changing allocatable to pointer, for example, works.

Now to find out where that is happening.

Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types
       [not found] <bug-92586-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-08-24 17:57 ` pault at gcc dot gnu.org
@ 2023-08-26 12:51 ` pault at gcc dot gnu.org
  2023-08-26 13:38 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu.org @ 2023-08-26 12:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pault at gcc dot gnu.org

--- Comment #12 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 55798
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55798&action=edit
Fix for this PR

Once the offending location was found, this fix became 'obvious'.

I will be committing as such later on.

Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types
       [not found] <bug-92586-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2023-08-26 12:51 ` pault at gcc dot gnu.org
@ 2023-08-26 13:38 ` cvs-commit at gcc dot gnu.org
  2023-09-24 14:35 ` cvs-commit at gcc dot gnu.org
  2023-09-24 14:36 ` pault at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-26 13:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:

https://gcc.gnu.org/g:44bcb51eb0d5cac6eb2de54541ca8e6c2d738160

commit r14-3501-g44bcb51eb0d5cac6eb2de54541ca8e6c2d738160
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Sat Aug 26 14:37:49 2023 +0100

    Fortran: Supply a missing dereference [PR92586]

    2023-08-26  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran
            PR fortran/92586
            * trans-expr.cc (gfc_trans_arrayfunc_assign): Supply a missing
            dereference for the call to gfc_deallocate_alloc_comp_no_caf.

    gcc/testsuite/
            PR fortran/92586
            * gfortran.dg/pr92586.f90 : New test

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types
       [not found] <bug-92586-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2023-08-26 13:38 ` cvs-commit at gcc dot gnu.org
@ 2023-09-24 14:35 ` cvs-commit at gcc dot gnu.org
  2023-09-24 14:36 ` pault at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-24 14:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Paul Thomas <pault@gcc.gnu.org>:

https://gcc.gnu.org/g:9eb2f102d38697011d3069fac759b7c6e149bed4

commit r13-7834-g9eb2f102d38697011d3069fac759b7c6e149bed4
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Sun Sep 24 15:34:57 2023 +0100

    Fortran: Supply a missing dereference [PR92586]

    2023-09-24  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran
            PR fortran/92586
            * trans-expr.cc (gfc_trans_arrayfunc_assign): Supply a missing
            dereference for the call to gfc_deallocate_alloc_comp_no_caf.

    gcc/testsuite/
            PR fortran/92586
            * gfortran.dg/pr92586.f90 : New test

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types
       [not found] <bug-92586-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2023-09-24 14:35 ` cvs-commit at gcc dot gnu.org
@ 2023-09-24 14:36 ` pault at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu.org @ 2023-09-24 14:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #15 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed on 13-branch and mainline.

Thanks for the report

Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-09-24 14:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-92586-4@http.gcc.gnu.org/bugzilla/>
2020-07-13 11:09 ` [Bug fortran/92586] ICE in gimplify_expr, at gimplify.c:13479 with nested allocatable derived types epagone at email dot it
2021-09-29 18:46 ` epagone at email dot it
2023-08-24 17:57 ` pault at gcc dot gnu.org
2023-08-26 12:51 ` pault at gcc dot gnu.org
2023-08-26 13:38 ` cvs-commit at gcc dot gnu.org
2023-09-24 14:35 ` cvs-commit at gcc dot gnu.org
2023-09-24 14:36 ` pault at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).