public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/96737] New: ICE when compiling module and submodule in same file
@ 2020-08-21 17:00 vehre at gcc dot gnu.org
  2020-08-21 17:08 ` [Bug fortran/96737] " dominiq at lps dot ens.fr
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vehre at gcc dot gnu.org @ 2020-08-21 17:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96737
           Summary: ICE when compiling module and submodule in same file
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vehre at gcc dot gnu.org
  Target Milestone: ---

Latest gfortran ICE with:
   35 | end module
      | 
Error: 'TYPE_CANONICAL' is not compatible
 <record_type 0x7f1324fef000 surfaces asm_written BLK
    size <integer_cst 0x7f1324fde2d0 type <integer_type 0x7f1324e100a8
bitsizetype> constant 960>
    unit-size <integer_cst 0x7f1324fde228 type <integer_type 0x7f1324e10000
sizetype> constant 120>
    align:64 warn_if_not_align:0 symtab:620683744 alias-set -1 canonical-type
0x7f1324fef000
    fields <field_decl 0x7f1324ff0720 halo_outbox
        type <record_type 0x7f1324fef2a0 array03_package asm_written type_1 BLK
size <integer_cst 0x7f1324fde2d0 960> unit-size <integer_cst 0x7f1324fde228
120>
            align:64 warn_if_not_align:0 symtab:620683824 alias-set -1
canonical-type 0x7f1324fef348 fields <field_decl 0x7f1324fe8ed8 data>
            pointer_to_this <pointer_type 0x7f1324fef738> chain <type_decl
0x7f1324ff0688 D.4057>>
        BLK ../build-gcc/opencoarrays/intel-18-works-onefile.f90:35:10 size
<integer_cst 0x7f1324fde2d0 960> unit-size <integer_cst 0x7f1324fde228 120>
        align:64 warn_if_not_align:0 offset_align 128
        offset <integer_cst 0x7f1324dfbbe8 constant 0>
        bit-offset <integer_cst 0x7f1324dfbc30 constant 0> context <record_type
0x7f1324fef000 surfaces>> context <namespace_decl 0x7f1324fd81c8
surface_packages>
    pointer_to_this <pointer_type 0x7f1324be3888> reference_to_this
<reference_type 0x7f1324be8348> chain <type_decl 0x7f1324ff07b8 D.4059>>
 <record_type 0x7f1324c2c930 surfaces BLK
    size <integer_cst 0x7f1324fde198 type <integer_type 0x7f1324e100a8
bitsizetype> constant 1152>
    unit-size <integer_cst 0x7f1324fc2528 type <integer_type 0x7f1324e10000
sizetype> constant 144>
    align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1324fef000
    fields <field_decl 0x7f1324c2dd10 halo_outbox
        type <record_type 0x7f1324c2c2a0 array04_package type_1 BLK size
<integer_cst 0x7f1324fde198 1152> unit-size <integer_cst 0x7f1324fc2528 144>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f1324c2c498 fields <field_decl 0x7f1324c2d558 data>
            pointer_to_this <pointer_type 0x7f1324c2cd20> chain <type_decl
0x7f1324c2dc78 D.4549>>
        BLK ../build-gcc/opencoarrays/intel-18-works-onefile.f90:64:13 size
<integer_cst 0x7f1324fde198 1152> unit-size <integer_cst 0x7f1324fc2528 144>
        align:64 warn_if_not_align:0 offset_align 128
        offset <integer_cst 0x7f1324dfbbe8 constant 0>
        bit-offset <integer_cst 0x7f1324dfbc30 constant 0> context <record_type
0x7f1324c2c930 surfaces>>
    chain <type_decl 0x7f1324c2dda8 D.4551>>
../build-gcc/opencoarrays/intel-18-works-onefile.f90:35:0: internal compiler
error: 'verify_type' failed
0x17b70de verify_type(tree_node const*)
        /home/vehre/Projekte/gcc/gcc.orig/gcc/tree.c:14744
0xd38de7 gen_type_die_with_usage
        /home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:25500
0xd39a1a gen_type_die
        /home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:25730
0xd3b95b gen_decl_die
        /home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:26362
0xd3ce96 dwarf2out_decl
        /home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:26910
0xd3c2f9 dwarf2out_type_decl
        /home/vehre/Projekte/gcc/gcc.orig/gcc/dwarf2out.c:26635
0x11b6fa3 rest_of_type_compilation(tree_node*, int)
        /home/vehre/Projekte/gcc/gcc.orig/gcc/passes.c:339
0xb70435 gfc_finish_type(tree_node*)
        /home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-types.c:2327
0xb71ce0 gfc_get_derived_type(gfc_symbol*, int)
        /home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-types.c:2812
0xb6c943 gfc_typenode_for_spec(gfc_typespec*, int)
        /home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-types.c:1166
0xb700ce gfc_sym_type(gfc_symbol*)
        /home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-types.c:2247
0xac977d gfc_get_symbol_decl(gfc_symbol*)
        /home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-decl.c:1769
0xad70b2 gfc_create_module_variable
        /home/vehre/Projekte/gcc/gcc.orig/gcc/fortran/trans-decl.c:5307

when compiling the example from:

https://github.com/sourceryinstitute/AdHoc/blob/master/src/gnu/nrc/coarray-with-nested-allocatable-components/intel-18-works.f90

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

* [Bug fortran/96737] ICE when compiling module and submodule in same file
  2020-08-21 17:00 [Bug fortran/96737] New: ICE when compiling module and submodule in same file vehre at gcc dot gnu.org
@ 2020-08-21 17:08 ` dominiq at lps dot ens.fr
  2020-08-22 19:15 ` dominiq at lps dot ens.fr
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-08-21 17:08 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-08-21
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This seems fixed on GCC11.

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

* [Bug fortran/96737] ICE when compiling module and submodule in same file
  2020-08-21 17:00 [Bug fortran/96737] New: ICE when compiling module and submodule in same file vehre at gcc dot gnu.org
  2020-08-21 17:08 ` [Bug fortran/96737] " dominiq at lps dot ens.fr
@ 2020-08-22 19:15 ` dominiq at lps dot ens.fr
  2020-08-23 14:23 ` [Bug fortran/96737] ICE when compiling module and submodule in same file with debug (-g) vehre at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-08-22 19:15 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I see the error if I compile the test with -g.

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

* [Bug fortran/96737] ICE when compiling module and submodule in same file with debug (-g)
  2020-08-21 17:00 [Bug fortran/96737] New: ICE when compiling module and submodule in same file vehre at gcc dot gnu.org
  2020-08-21 17:08 ` [Bug fortran/96737] " dominiq at lps dot ens.fr
  2020-08-22 19:15 ` dominiq at lps dot ens.fr
@ 2020-08-23 14:23 ` vehre at gcc dot gnu.org
  2020-08-23 14:34 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vehre at gcc dot gnu.org @ 2020-08-23 14:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andre Vehreschild <vehre at gcc dot gnu.org> ---
Sorry, I was in a hurry to post the pr. You're right one needs to specify '-g'
to see the issue.

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

* [Bug fortran/96737] ICE when compiling module and submodule in same file with debug (-g)
  2020-08-21 17:00 [Bug fortran/96737] New: ICE when compiling module and submodule in same file vehre at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-08-23 14:23 ` [Bug fortran/96737] ICE when compiling module and submodule in same file with debug (-g) vehre at gcc dot gnu.org
@ 2020-08-23 14:34 ` cvs-commit at gcc dot gnu.org
  2020-08-23 14:37 ` cvs-commit at gcc dot gnu.org
  2020-08-23 14:39 ` pault at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-23 14:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:c4565031c8dc6b5289e36553e5cd937a91825953

commit r11-2809-gc4565031c8dc6b5289e36553e5cd937a91825953
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Sun Aug 23 15:34:27 2020 +0100

    This patch fixes PR96737. See the explanatory comment in the testcase.

    2020-08-23  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran
            PR fortran/96737
            * trans-types.c (gfc_get_derived_type): Derived types that are
            used in submodules are not compatible with TYPE_CANONICAL from
            any of the global namespaces.

    gcc/testsuite/
            PR fortran/96737
            * gfortran.dg/pr96737.f90: New test.

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

* [Bug fortran/96737] ICE when compiling module and submodule in same file with debug (-g)
  2020-08-21 17:00 [Bug fortran/96737] New: ICE when compiling module and submodule in same file vehre at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-08-23 14:34 ` cvs-commit at gcc dot gnu.org
@ 2020-08-23 14:37 ` cvs-commit at gcc dot gnu.org
  2020-08-23 14:39 ` pault at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-23 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:967454a212c7693577a1911e637c3f9f3edc7ccf

commit r11-2810-g967454a212c7693577a1911e637c3f9f3edc7ccf
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Sun Aug 23 15:37:21 2020 +0100

    Adding option -g to pr96737.f90.

    2020-08-23  Paul Thomas  <pault@gcc.gnu.org>

    gcc/testsuite/
            PR fortran/96737
            * gfortran.dg/pr96737.f90: Add option -g.

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

* [Bug fortran/96737] ICE when compiling module and submodule in same file with debug (-g)
  2020-08-21 17:00 [Bug fortran/96737] New: ICE when compiling module and submodule in same file vehre at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-08-23 14:37 ` cvs-commit at gcc dot gnu.org
@ 2020-08-23 14:39 ` pault at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu.org @ 2020-08-23 14:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to CVS Commits from comment #5)
> The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
> 
> https://gcc.gnu.org/g:967454a212c7693577a1911e637c3f9f3edc7ccf
> 
> commit r11-2810-g967454a212c7693577a1911e637c3f9f3edc7ccf
> Author: Paul Thomas <pault@gcc.gnu.org>
> Date:   Sun Aug 23 15:37:21 2020 +0100
> 
>     Adding option -g to pr96737.f90.
>     
>     2020-08-23  Paul Thomas  <pault@gcc.gnu.org>
>     
>     gcc/testsuite/
>             PR fortran/96737
>             * gfortran.dg/pr96737.f90: Add option -g.

Duuh! I forgot the -g too!

Closing.

Paul

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

end of thread, other threads:[~2020-08-23 14:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-21 17:00 [Bug fortran/96737] New: ICE when compiling module and submodule in same file vehre at gcc dot gnu.org
2020-08-21 17:08 ` [Bug fortran/96737] " dominiq at lps dot ens.fr
2020-08-22 19:15 ` dominiq at lps dot ens.fr
2020-08-23 14:23 ` [Bug fortran/96737] ICE when compiling module and submodule in same file with debug (-g) vehre at gcc dot gnu.org
2020-08-23 14:34 ` cvs-commit at gcc dot gnu.org
2020-08-23 14:37 ` cvs-commit at gcc dot gnu.org
2020-08-23 14:39 ` 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).