public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Bug 83319 - [7/8 Regression] ICE on use of allocatable component in derived type coarray defined in module
@ 2017-12-08  4:13 Damian Rouson
  2017-12-08  7:49 ` Andre Vehreschild
  2017-12-26 13:55 ` Paul Richard Thomas
  0 siblings, 2 replies; 4+ messages in thread
From: Damian Rouson @ 2017-12-08  4:13 UTC (permalink / raw)
  To: gfortran; +Cc: Andre Vehreschild

Presumably the internal compiler error (ICE) demonstrated below is somehow related to the known regression in support for allocatable components in derived type coarrays, which is issue 422 on the OpenCoarrays repository. OpenCoarrays issue 422, however, generates a runtime error message inside the coarray ABI, whereas this issue generates a compile-time error message even without linking to OpenCoarrays.  Also, OpenCoarrays issue 422 involves communication; whereas this is much more basic: the ICE appears when I do anything with the allocatable component so this is an even more serious regression on top of the already very serious regression described in issue 422.  (Besides allocating the component as shown below, I also tried a source allocation and an assignment to it.)  The ICE disappears if the derived type definition is moved into the main program.

This is somewhat similar to PR 78935, but 78935 was fixed 11 months ago and this seems sufficiently different to warrant a separate PR rather than reopening 78935.

This ICE occurs with today's 7 branch, with 7.2.0, and with the trunk dated 20170921.  The code compiles cleanly with GCC 6.4.0.

$ cat allocatable-component-of-dt-coarray.f90 

module foo_module
  implicit none
  type foo
    integer, allocatable :: i(:)
  end type
end module

  use foo_module
  implicit none
  type(foo), save :: bar[*]
  allocate(bar%i(1))
end

$ gfortran -fcoarray=lib -c allocatable-component-of-dt-coarray.f90 

allocatable-component-of-dt-coarray.f90:8:0:

   use foo_module
 
internal compiler error: in gfc_conv_descriptor_token, at fortran/trans-array.c:305
0x6a9130 gfc_conv_descriptor_token(tree_node*)
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-array.c:303
0x6d6858 gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:7567
0x6d0b47 gfc_conv_structure(gfc_se*, gfc_expr*, int)
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:7686
0x6df17e gfc_trans_assignment_1
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:9984
0x6be5ff generate_coarray_sym_init
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:5188
0x68dc72 do_traverse_symtree
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/symbol.c:4009
0x6bdc95 generate_coarray_init
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:5238
0x6c9954 gfc_generate_function_code(gfc_namespace*)
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:6273
0x65b736 translate_all_program_units
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/parse.c:6074
0x65b736 gfc_parse_file()
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/parse.c:6274
0x69ff5f gfc_be_parse_file
	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/f95-lang.c:204
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ gfortran --version
GNU Fortran (GCC) 7.2.1 20171208

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

* Re: Bug 83319 - [7/8 Regression] ICE on use of allocatable component in derived type coarray defined in module
  2017-12-08  4:13 Bug 83319 - [7/8 Regression] ICE on use of allocatable component in derived type coarray defined in module Damian Rouson
@ 2017-12-08  7:49 ` Andre Vehreschild
  2017-12-08  8:51   ` Paul Richard Thomas
  2017-12-26 13:55 ` Paul Richard Thomas
  1 sibling, 1 reply; 4+ messages in thread
From: Andre Vehreschild @ 2017-12-08  7:49 UTC (permalink / raw)
  To: fortran, Damian Rouson, gfortran

Use gcc-trunk. I think Paul fixed that. But only on trunk. I don't know whether he back ported to gcc-7, but if he did then to 7.3

- Andre

Am 8. Dezember 2017 05:12:58 MEZ schrieb Damian Rouson <damian@sourceryinstitute.org>:
>Presumably the internal compiler error (ICE) demonstrated below is
>somehow related to the known regression in support for allocatable
>components in derived type coarrays, which is issue 422 on the
>OpenCoarrays repository. OpenCoarrays issue 422, however, generates a
>runtime error message inside the coarray ABI, whereas this issue
>generates a compile-time error message even without linking to
>OpenCoarrays.  Also, OpenCoarrays issue 422 involves communication;
>whereas this is much more basic: the ICE appears when I do anything
>with the allocatable component so this is an even more serious
>regression on top of the already very serious regression described in
>issue 422.  (Besides allocating the component as shown below, I also
>tried a source allocation and an assignment to it.)  The ICE disappears
>if the derived type definition is moved into the main program.
>
>This is somewhat similar to PR 78935, but 78935 was fixed 11 months ago
>and this seems sufficiently different to warrant a separate PR rather
>than reopening 78935.
>
>This ICE occurs with today's 7 branch, with 7.2.0, and with the trunk
>dated 20170921.  The code compiles cleanly with GCC 6.4.0.
>
>$ cat allocatable-component-of-dt-coarray.f90 
>
>module foo_module
>  implicit none
>  type foo
>    integer, allocatable :: i(:)
>  end type
>end module
>
>  use foo_module
>  implicit none
>  type(foo), save :: bar[*]
>  allocate(bar%i(1))
>end
>
>$ gfortran -fcoarray=lib -c allocatable-component-of-dt-coarray.f90 
>
>allocatable-component-of-dt-coarray.f90:8:0:
>
>   use foo_module
> 
>internal compiler error: in gfc_conv_descriptor_token, at
>fortran/trans-array.c:305
>0x6a9130 gfc_conv_descriptor_token(tree_node*)
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-array.c:303
>0x6d6858 gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:7567
>0x6d0b47 gfc_conv_structure(gfc_se*, gfc_expr*, int)
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:7686
>0x6df17e gfc_trans_assignment_1
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:9984
>0x6be5ff generate_coarray_sym_init
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:5188
>0x68dc72 do_traverse_symtree
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/symbol.c:4009
>0x6bdc95 generate_coarray_init
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:5238
>0x6c9954 gfc_generate_function_code(gfc_namespace*)
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:6273
>0x65b736 translate_all_program_units
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/parse.c:6074
>0x65b736 gfc_parse_file()
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/parse.c:6274
>0x69ff5f gfc_be_parse_file
>	/home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/f95-lang.c:204
>Please submit a full bug report,
>with preprocessed source if appropriate.
>Please include the complete backtrace with any bug report.
>See <https://gcc.gnu.org/bugs/> for instructions.
>
>$ gfortran --version
>GNU Fortran (GCC) 7.2.1 20171208

-- 
Andre Vehreschild * Kreuzherrenstr. 8 * 52062 Aachen
vehre@gmx.de * Tel. +49 178 3837536

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

* Re: Bug 83319 - [7/8 Regression] ICE on use of allocatable component in derived type coarray defined in module
  2017-12-08  7:49 ` Andre Vehreschild
@ 2017-12-08  8:51   ` Paul Richard Thomas
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Richard Thomas @ 2017-12-08  8:51 UTC (permalink / raw)
  To: Andre Vehreschild; +Cc: Damian Rouson, gfortran

Hi Damian and Andre,

That's #83076 that Andre is referring to. Dominique uncovered some
issue with it and I just have not had time to return to it. I will try
to deal with it in the next couple of days. However, my immediate
priority, once I am past the daytime work, is to get PDT descriptors
up and running.

Regards

Paul


On 8 December 2017 at 07:49, Andre Vehreschild <vehre@gmx.de> wrote:
> Use gcc-trunk. I think Paul fixed that. But only on trunk. I don't know whether he back ported to gcc-7, but if he did then to 7.3
>
> - Andre
>
> Am 8. Dezember 2017 05:12:58 MEZ schrieb Damian Rouson <damian@sourceryinstitute.org>:
>>Presumably the internal compiler error (ICE) demonstrated below is
>>somehow related to the known regression in support for allocatable
>>components in derived type coarrays, which is issue 422 on the
>>OpenCoarrays repository. OpenCoarrays issue 422, however, generates a
>>runtime error message inside the coarray ABI, whereas this issue
>>generates a compile-time error message even without linking to
>>OpenCoarrays.  Also, OpenCoarrays issue 422 involves communication;
>>whereas this is much more basic: the ICE appears when I do anything
>>with the allocatable component so this is an even more serious
>>regression on top of the already very serious regression described in
>>issue 422.  (Besides allocating the component as shown below, I also
>>tried a source allocation and an assignment to it.)  The ICE disappears
>>if the derived type definition is moved into the main program.
>>
>>This is somewhat similar to PR 78935, but 78935 was fixed 11 months ago
>>and this seems sufficiently different to warrant a separate PR rather
>>than reopening 78935.
>>
>>This ICE occurs with today's 7 branch, with 7.2.0, and with the trunk
>>dated 20170921.  The code compiles cleanly with GCC 6.4.0.
>>
>>$ cat allocatable-component-of-dt-coarray.f90
>>
>>module foo_module
>>  implicit none
>>  type foo
>>    integer, allocatable :: i(:)
>>  end type
>>end module
>>
>>  use foo_module
>>  implicit none
>>  type(foo), save :: bar[*]
>>  allocate(bar%i(1))
>>end
>>
>>$ gfortran -fcoarray=lib -c allocatable-component-of-dt-coarray.f90
>>
>>allocatable-component-of-dt-coarray.f90:8:0:
>>
>>   use foo_module
>>
>>internal compiler error: in gfc_conv_descriptor_token, at
>>fortran/trans-array.c:305
>>0x6a9130 gfc_conv_descriptor_token(tree_node*)
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-array.c:303
>>0x6d6858 gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:7567
>>0x6d0b47 gfc_conv_structure(gfc_se*, gfc_expr*, int)
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:7686
>>0x6df17e gfc_trans_assignment_1
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:9984
>>0x6be5ff generate_coarray_sym_init
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:5188
>>0x68dc72 do_traverse_symtree
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/symbol.c:4009
>>0x6bdc95 generate_coarray_init
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:5238
>>0x6c9954 gfc_generate_function_code(gfc_namespace*)
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:6273
>>0x65b736 translate_all_program_units
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/parse.c:6074
>>0x65b736 gfc_parse_file()
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/parse.c:6274
>>0x69ff5f gfc_be_parse_file
>>       /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/f95-lang.c:204
>>Please submit a full bug report,
>>with preprocessed source if appropriate.
>>Please include the complete backtrace with any bug report.
>>See <https://gcc.gnu.org/bugs/> for instructions.
>>
>>$ gfortran --version
>>GNU Fortran (GCC) 7.2.1 20171208
>
> --
> Andre Vehreschild * Kreuzherrenstr. 8 * 52062 Aachen
> vehre@gmx.de * Tel. +49 178 3837536



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

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

* Re: Bug 83319 - [7/8 Regression] ICE on use of allocatable component in derived type coarray defined in module
  2017-12-08  4:13 Bug 83319 - [7/8 Regression] ICE on use of allocatable component in derived type coarray defined in module Damian Rouson
  2017-12-08  7:49 ` Andre Vehreschild
@ 2017-12-26 13:55 ` Paul Richard Thomas
  1 sibling, 0 replies; 4+ messages in thread
From: Paul Richard Thomas @ 2017-12-26 13:55 UTC (permalink / raw)
  To: Damian Rouson; +Cc: gfortran, Andre Vehreschild

Dear All,

I have just reached a point where my fix for PR83076 withstands all
the curve balls that Dominique has found. I just now turned my
attention to PR83319, hoping that the cause was the same, and I find
that it is totally different:

internal compiler error: in gfc_conv_descriptor_token, at
fortran/trans-array.c:305

in Damian's report tells us immediately that it is totally different.

I'm on to it and want to get both fixed before I submit.

Cheers

Paul


On 8 December 2017 at 04:12, Damian Rouson <damian@sourceryinstitute.org> wrote:
> Presumably the internal compiler error (ICE) demonstrated below is somehow related to the known regression in support for allocatable components in derived type coarrays, which is issue 422 on the OpenCoarrays repository. OpenCoarrays issue 422, however, generates a runtime error message inside the coarray ABI, whereas this issue generates a compile-time error message even without linking to OpenCoarrays.  Also, OpenCoarrays issue 422 involves communication; whereas this is much more basic: the ICE appears when I do anything with the allocatable component so this is an even more serious regression on top of the already very serious regression described in issue 422.  (Besides allocating the component as shown below, I also tried a source allocation and an assignment to it.)  The ICE disappears if the derived type definition is moved into the main program.
>
> This is somewhat similar to PR 78935, but 78935 was fixed 11 months ago and this seems sufficiently different to warrant a separate PR rather than reopening 78935.
>
> This ICE occurs with today's 7 branch, with 7.2.0, and with the trunk dated 20170921.  The code compiles cleanly with GCC 6.4.0.
>
> $ cat allocatable-component-of-dt-coarray.f90
>
> module foo_module
>   implicit none
>   type foo
>     integer, allocatable :: i(:)
>   end type
> end module
>
>   use foo_module
>   implicit none
>   type(foo), save :: bar[*]
>   allocate(bar%i(1))
> end
>
> $ gfortran -fcoarray=lib -c allocatable-component-of-dt-coarray.f90
>
> allocatable-component-of-dt-coarray.f90:8:0:
>
>    use foo_module
>
> internal compiler error: in gfc_conv_descriptor_token, at fortran/trans-array.c:305
> 0x6a9130 gfc_conv_descriptor_token(tree_node*)
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-array.c:303
> 0x6d6858 gfc_trans_structure_assign(tree_node*, gfc_expr*, bool, bool)
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:7567
> 0x6d0b47 gfc_conv_structure(gfc_se*, gfc_expr*, int)
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:7686
> 0x6df17e gfc_trans_assignment_1
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-expr.c:9984
> 0x6be5ff generate_coarray_sym_init
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:5188
> 0x68dc72 do_traverse_symtree
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/symbol.c:4009
> 0x6bdc95 generate_coarray_init
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:5238
> 0x6c9954 gfc_generate_function_code(gfc_namespace*)
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/trans-decl.c:6273
> 0x65b736 translate_all_program_units
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/parse.c:6074
> 0x65b736 gfc_parse_file()
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/parse.c:6274
> 0x69ff5f gfc_be_parse_file
>         /home/rouson/Desktop/Builds/opencoarrays/prerequisites/downloads/gcc-7-branch/gcc/fortran/f95-lang.c:204
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <https://gcc.gnu.org/bugs/> for instructions.
>
> $ gfortran --version
> GNU Fortran (GCC) 7.2.1 20171208



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

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

end of thread, other threads:[~2017-12-26 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-08  4:13 Bug 83319 - [7/8 Regression] ICE on use of allocatable component in derived type coarray defined in module Damian Rouson
2017-12-08  7:49 ` Andre Vehreschild
2017-12-08  8:51   ` Paul Richard Thomas
2017-12-26 13:55 ` Paul Richard Thomas

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).