public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
@ 2024-04-16 11:10 dcb314 at hotmail dot com
  2024-04-16 14:55 ` [Bug fortran/114739] " kargls at comcast dot net
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2024-04-16 11:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114739
           Summary: [14 Regression] ice in gfc_find_derived_types, at
                    fortran/symbol.cc:2458
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

From the flang testsuite at

https://github.com/llvm/llvm-project/tree/main/flang/test

file ./Semantics/symbol07.f90, does this with gfortran 13.2:

$ ~/gcc/results.13.2.asan.ubsan/bin/gfortran -c -w ./Semantics/symbol07.f90
./Semantics/symbol07.f90:28:5:

   28 |  z2%re = x
      |     1
Error: Symbol ‘z2’ at (1) has no IMPLICIT type
./Semantics/symbol07.f90:31:5:

   31 |  z2%im = y
      |     1
Error: Symbol ‘z2’ at (1) has no IMPLICIT type
$

and this with yesterday's gfortran:

$ ~/gcc/results.20240415.asan.ubsan/bin/gfortran -c -w ./Semantics/symbol07.f90
f951: internal compiler error: in gfc_find_derived_types, at
fortran/symbol.cc:2458
0x6f3ca3 gfc_find_derived_types(gfc_symbol*, gfc_namespace*, char const*, bool)
        ../../trunk.20210101/gcc/fortran/symbol.cc:2458
0x9e1686 gfc_match_varspec(gfc_expr*, int, bool, bool)
        ../../trunk.20210101/gcc/fortran/primary.cc:2246
0x9e1916 match_variable
        ../../trunk.20210101/gcc/fortran/primary.cc:4309
0x99a364 gfc_match(char const*, ...)
        ../../trunk.20210101/gcc/fortran/match.cc:1144

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
@ 2024-04-16 14:55 ` kargls at comcast dot net
  2024-04-16 15:05 ` dcb314 at hotmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: kargls at comcast dot net @ 2024-04-16 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

kargls at comcast dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargls at comcast dot net

--- Comment #1 from kargls at comcast dot net ---
Please attach a the source code.

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
  2024-04-16 14:55 ` [Bug fortran/114739] " kargls at comcast dot net
@ 2024-04-16 15:05 ` dcb314 at hotmail dot com
  2024-04-16 16:55 ` anlauf at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2024-04-16 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
Created attachment 57959
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57959&action=edit
F90 source code

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
  2024-04-16 14:55 ` [Bug fortran/114739] " kargls at comcast dot net
  2024-04-16 15:05 ` dcb314 at hotmail dot com
@ 2024-04-16 16:55 ` anlauf at gcc dot gnu.org
  2024-04-16 19:04 ` anlauf at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-04-16 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code,
                   |                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
           Priority|P3                          |P4
   Last reconfirmed|                            |2024-04-16

--- Comment #3 from anlauf at gcc dot gnu.org ---
We fail to figure out that z2 is complex.

Adding
  complex z2
avoid the issues.

Not really a regression except for the ICE, since we falsely rejected the code
up to 13.

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2024-04-16 16:55 ` anlauf at gcc dot gnu.org
@ 2024-04-16 19:04 ` anlauf at gcc dot gnu.org
  2024-04-16 19:27 ` anlauf at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-04-16 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from anlauf at gcc dot gnu.org ---
Reduced testcase:

program main
  implicit complex(z)
  z2%re = 1.
  z2%im = 2.
end

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2024-04-16 19:04 ` anlauf at gcc dot gnu.org
@ 2024-04-16 19:27 ` anlauf at gcc dot gnu.org
  2024-04-17 16:28 ` pault at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-04-16 19:27 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #5 from anlauf at gcc dot gnu.org ---
We're running into code in primary.cc modified at r14-9489-g3fd46d859cda10
which checks for inquiry references.

CC'ing Paul.

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2024-04-16 19:27 ` anlauf at gcc dot gnu.org
@ 2024-04-17 16:28 ` pault at gcc dot gnu.org
  2024-04-18 17:07 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-17 16:28 UTC (permalink / raw)
  To: gcc-bugs

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

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 #6 from Paul Thomas <pault at gcc dot gnu.org> ---
Hi David and Harald,

Thanks for the heads up.

I am within minutes of posting a fix on the list.

Paul

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2024-04-17 16:28 ` pault at gcc dot gnu.org
@ 2024-04-18 17:07 ` cvs-commit at gcc dot gnu.org
  2024-04-19  8:00 ` pault at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-18 17:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from GCC 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:e243d0feafa533141ef7e23820d5cc60cf33204a

commit r14-10030-ge243d0feafa533141ef7e23820d5cc60cf33204a
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Thu Apr 18 18:07:25 2024 +0100

    Fortran: Fix ICE and clear incorrect error messages [PR114739]

    2024-04-18  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran
            PR fortran/114739
            * primary.cc (gfc_match_varspec): Check for default type before
            checking for derived types with the right component name.

    gcc/testsuite/
            PR fortran/114739
            * gfortran.dg/pr114739.f90: New test.
            * gfortran.dg/derived_comp_array_ref_8.f90: Add 'implicit none'
            for consistency with expected error message.
            * gfortran.dg/nullify_4.f90: ditto
            * gfortran.dg/pointer_init_6.f90: ditto
            * gfortran.dg/pr107397.f90: ditto
            * gfortran.dg/pr88138.f90: ditto

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2024-04-18 17:07 ` cvs-commit at gcc dot gnu.org
@ 2024-04-19  8:00 ` pault at gcc dot gnu.org
  2024-04-19 15:45 ` pault at gcc dot gnu.org
  2024-04-23  9:39 ` [Bug fortran/114739] Ensure no IMPLICIT type errors appear when they should for inquiry references pault at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-19  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> ---
Thanks for the report. Fixed on mainline.

The incorrect errors will have to be fixed on 13-branch at very least.
Unfortunately, this is not a question of using a backport but I will get onto
it right away.

Regards

Paul

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

* [Bug fortran/114739] [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2024-04-19  8:00 ` pault at gcc dot gnu.org
@ 2024-04-19 15:45 ` pault at gcc dot gnu.org
  2024-04-23  9:39 ` [Bug fortran/114739] Ensure no IMPLICIT type errors appear when they should for inquiry references pault at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-19 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---

> The incorrect errors will have to be fixed on 13-branch at very least.
> Unfortunately, this is not a question of using a backport but I will get
> onto it right away.
> 


I have applied the backport manually and it works fine in eliminating the
incorrect error. I'll apply to 12- and 13-branches in a couple of weeks.

Cheers

Paul

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

* [Bug fortran/114739] Ensure no IMPLICIT type errors appear when they should for inquiry references
  2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
                   ` (8 preceding siblings ...)
  2024-04-19 15:45 ` pault at gcc dot gnu.org
@ 2024-04-23  9:39 ` pault at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-23  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[14 Regression] ice in      |Ensure no IMPLICIT type
                   |gfc_find_derived_types, at  |errors appear when they
                   |fortran/symbol.cc:2458      |should for inquiry
                   |                            |references

--- Comment #10 from Paul Thomas <pault at gcc dot gnu.org> ---
Changed the summary line

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

end of thread, other threads:[~2024-04-23  9:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16 11:10 [Bug fortran/114739] New: [14 Regression] ice in gfc_find_derived_types, at fortran/symbol.cc:2458 dcb314 at hotmail dot com
2024-04-16 14:55 ` [Bug fortran/114739] " kargls at comcast dot net
2024-04-16 15:05 ` dcb314 at hotmail dot com
2024-04-16 16:55 ` anlauf at gcc dot gnu.org
2024-04-16 19:04 ` anlauf at gcc dot gnu.org
2024-04-16 19:27 ` anlauf at gcc dot gnu.org
2024-04-17 16:28 ` pault at gcc dot gnu.org
2024-04-18 17:07 ` cvs-commit at gcc dot gnu.org
2024-04-19  8:00 ` pault at gcc dot gnu.org
2024-04-19 15:45 ` pault at gcc dot gnu.org
2024-04-23  9:39 ` [Bug fortran/114739] Ensure no IMPLICIT type errors appear when they should for inquiry references 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).