public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
@ 2015-10-01 17:50 ` gerhard.steinmetz.fortran@t-online.de
  2015-10-01 19:00 ` kargl at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-01 17:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Correct with a scalar string :

$ cat z2.f90
program p
   type t
      character :: c
   end type
   type(t) :: x
   data x /t('1')/
   print *, x
end

$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z2.f90
$ a.out
 1


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

* [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data
@ 2015-10-01 17:50 gerhard.steinmetz.fortran@t-online.de
  2015-10-01 17:50 ` [Bug fortran/67804] " gerhard.steinmetz.fortran@t-online.de
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-10-01 17:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67804
           Summary: ICE on data initialization of type(character) with
                    wrong data
           Product: gcc
           Version: 5.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

With wrong type of data in initializer t() :


$ cat z1.f90
program p
   type t
      character :: c
   end type
   type(t) :: x1, x2, x3, x4, x5, x6, x7, x8
   data x1 /t(1)/
   data x2 /t(1.)/
   data x3 /t(1d1)/
   data x4 /t((0.,1.))/
   data x5 /t(.true.)/
   data x6 /t(null())/
   data x7 /t(['1'])/
   data x8 /t([1])/
   !...
end


$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize z1.f90
internal compiler error: in gfc_conv_string_init, at fortran/trans-const.c:161


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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
  2015-10-01 17:50 ` [Bug fortran/67804] " gerhard.steinmetz.fortran@t-online.de
@ 2015-10-01 19:00 ` kargl at gcc dot gnu.org
  2022-01-12 19:46 ` anlauf at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-10-01 19:00 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-01
                 CC|                            |kargl at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |4.6.4, 4.7.4, 4.8.5, 4.9.4,
                   |                            |5.2.1, 6.0


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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
  2015-10-01 17:50 ` [Bug fortran/67804] " gerhard.steinmetz.fortran@t-online.de
  2015-10-01 19:00 ` kargl at gcc dot gnu.org
@ 2022-01-12 19:46 ` anlauf at gcc dot gnu.org
  2022-01-12 20:30 ` anlauf at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-12 19:46 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #3 from anlauf at gcc dot gnu.org ---
Created attachment 52174
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52174&action=edit
Tentative patch

This patch should improve error recovery for a bad structure constructor in
a DATA statement.

Regtesting...

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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
                   ` (2 preceding siblings ...)
  2022-01-12 19:46 ` anlauf at gcc dot gnu.org
@ 2022-01-12 20:30 ` anlauf at gcc dot gnu.org
  2022-01-13 18:24 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-12 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |anlauf at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #4 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-January/057373.html

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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
                   ` (3 preceding siblings ...)
  2022-01-12 20:30 ` anlauf at gcc dot gnu.org
@ 2022-01-13 18:24 ` cvs-commit at gcc dot gnu.org
  2022-01-16 20:40 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-13 18:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:0b8464365b15ac108cd1d00d5bc56d229c1340de

commit r12-6557-g0b8464365b15ac108cd1d00d5bc56d229c1340de
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Wed Jan 12 21:24:49 2022 +0100

    Fortran: fix error recovery on bad structure constructor in DATA statement

    gcc/fortran/ChangeLog:

            PR fortran/67804
            * primary.c (gfc_match_structure_constructor): Recover from errors
            that occurred while checking for a valid structure constructor in
            a DATA statement.

    gcc/testsuite/ChangeLog:

            PR fortran/67804
            * gfortran.dg/pr93604.f90: Adjust to changed diagnostics.
            * gfortran.dg/pr67804.f90: New test.

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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
                   ` (4 preceding siblings ...)
  2022-01-13 18:24 ` cvs-commit at gcc dot gnu.org
@ 2022-01-16 20:40 ` cvs-commit at gcc dot gnu.org
  2022-01-16 20:48 ` anlauf at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-16 20:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:c5bf6dc27cdb091f1f8046f98ce7ca197bffd908

commit r11-9465-gc5bf6dc27cdb091f1f8046f98ce7ca197bffd908
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Wed Jan 12 21:24:49 2022 +0100

    Fortran: fix error recovery on bad structure constructor in DATA statement

    gcc/fortran/ChangeLog:

            PR fortran/67804
            * primary.c (gfc_match_structure_constructor): Recover from errors
            that occurred while checking for a valid structure constructor in
            a DATA statement.

    gcc/testsuite/ChangeLog:

            PR fortran/67804
            * gfortran.dg/pr93604.f90: Adjust to changed diagnostics.
            * gfortran.dg/pr67804.f90: New test.

    (cherry picked from commit 0b8464365b15ac108cd1d00d5bc56d229c1340de)

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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
                   ` (5 preceding siblings ...)
  2022-01-16 20:40 ` cvs-commit at gcc dot gnu.org
@ 2022-01-16 20:48 ` anlauf at gcc dot gnu.org
  2022-01-25 18:25 ` anlauf at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-16 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from anlauf at gcc dot gnu.org ---
*** Bug 77667 has been marked as a duplicate of this bug. ***

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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
                   ` (6 preceding siblings ...)
  2022-01-16 20:48 ` anlauf at gcc dot gnu.org
@ 2022-01-25 18:25 ` anlauf at gcc dot gnu.org
  2022-01-25 19:37 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-25 18:25 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gscfq@t-online.de

--- Comment #8 from anlauf at gcc dot gnu.org ---
*** Bug 100275 has been marked as a duplicate of this bug. ***

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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
                   ` (7 preceding siblings ...)
  2022-01-25 18:25 ` anlauf at gcc dot gnu.org
@ 2022-01-25 19:37 ` cvs-commit at gcc dot gnu.org
  2022-01-25 20:01 ` anlauf at gcc dot gnu.org
  2022-03-18 19:54 ` anlauf at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-25 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:21551a4af1be07d7b98221639ec1bd18106c1f80

commit r10-10418-g21551a4af1be07d7b98221639ec1bd18106c1f80
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Wed Jan 12 21:24:49 2022 +0100

    Fortran: fix error recovery on bad structure constructor in DATA statement

    gcc/fortran/ChangeLog:

            PR fortran/67804
            * primary.c (gfc_match_structure_constructor): Recover from errors
            that occurred while checking for a valid structure constructor in
            a DATA statement.

    gcc/testsuite/ChangeLog:

            PR fortran/67804
            * gfortran.dg/pr93604.f90: Adjust to changed diagnostics.
            * gfortran.dg/pr67804.f90: New test.

    (cherry picked from commit 0b8464365b15ac108cd1d00d5bc56d229c1340de)

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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
                   ` (8 preceding siblings ...)
  2022-01-25 19:37 ` cvs-commit at gcc dot gnu.org
@ 2022-01-25 20:01 ` anlauf at gcc dot gnu.org
  2022-03-18 19:54 ` anlauf at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-25 20:01 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |10.4

--- Comment #10 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-12, and on 11- and 10-branch.

Trying to back further shows an unexpected failure during regtesting.
Not worth investigating, thus closing.

Thanks for the report!

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

* [Bug fortran/67804] ICE on data initialization of type(character) with wrong data
  2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
                   ` (9 preceding siblings ...)
  2022-01-25 20:01 ` anlauf at gcc dot gnu.org
@ 2022-03-18 19:54 ` anlauf at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-03-18 19:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from anlauf at gcc dot gnu.org ---
*** Bug 67817 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2022-03-18 19:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 17:50 [Bug fortran/67804] New: ICE on data initialization of type(character) with wrong data gerhard.steinmetz.fortran@t-online.de
2015-10-01 17:50 ` [Bug fortran/67804] " gerhard.steinmetz.fortran@t-online.de
2015-10-01 19:00 ` kargl at gcc dot gnu.org
2022-01-12 19:46 ` anlauf at gcc dot gnu.org
2022-01-12 20:30 ` anlauf at gcc dot gnu.org
2022-01-13 18:24 ` cvs-commit at gcc dot gnu.org
2022-01-16 20:40 ` cvs-commit at gcc dot gnu.org
2022-01-16 20:48 ` anlauf at gcc dot gnu.org
2022-01-25 18:25 ` anlauf at gcc dot gnu.org
2022-01-25 19:37 ` cvs-commit at gcc dot gnu.org
2022-01-25 20:01 ` anlauf at gcc dot gnu.org
2022-03-18 19:54 ` anlauf 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).