public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH)
@ 2015-03-24  0:55 anlauf at gmx dot de
  2015-03-24  2:08 ` [Bug fortran/65532] " anlauf at gmx dot de
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: anlauf at gmx dot de @ 2015-03-24  0:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65532
           Summary: [5 Regression] Unexpected error with legacy code
                    (D1MACH)
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gmx dot de

Created attachment 35119
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35119&action=edit
Bug demo.

Dear all,

after updating to trunk rev. 221607, I found a problem which I reduced
to the attached example.

Commenting out the call to d1mach or commenting out in d1mach the
data statements in lines 21-25 makes the error messages disappear.

Here's the error messages I get:

% gfc-trunk -c gfcbug131.f90
gfcbug131.f90:10:23:

     INTEGER :: diver(4)
                       1
Error: Different shape for array assignment at (1) on dimension 1 (4 and 2)
gfcbug131.f90:8:23:

     INTEGER :: large(4)
                       1
Error: Different shape for array assignment at (1) on dimension 1 (4 and 2)
gfcbug131.f90:11:23:

     INTEGER :: LOG10(4)
                       1
Error: Different shape for array assignment at (1) on dimension 1 (4 and 2)
gfcbug131.f90:9:23:

     INTEGER :: right(4)
                       1
Error: Different shape for array assignment at (1) on dimension 1 (4 and 2)
gfcbug131.f90:7:23:

     INTEGER :: small(4)
                       1
Error: Different shape for array assignment at (1) on dimension 1 (4 and 2)


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
@ 2015-03-24  2:08 ` anlauf at gmx dot de
  2015-03-24  2:09 ` dominiq at lps dot ens.fr
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: anlauf at gmx dot de @ 2015-03-24  2:08 UTC (permalink / raw)
  To: gcc-bugs

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

Harald Anlauf <anlauf at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.9.0
      Known to fail|                            |5.0

--- Comment #1 from Harald Anlauf <anlauf at gmx dot de> ---
I found a workaround by changing the dimension of the arrays in
lines 7-11 to 2 instead of 4 (the original code also supports
dated hardware).


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
  2015-03-24  2:08 ` [Bug fortran/65532] " anlauf at gmx dot de
@ 2015-03-24  2:09 ` dominiq at lps dot ens.fr
  2015-03-24  7:44 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-03-24  2:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I suspect r221586: I don't see the errors at r221569.

> I found a workaround by changing the dimension of the arrays in
> lines 7-11 to 2 instead of 4 (the original code also supports
> dated hardware).

Confirmed.


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
  2015-03-24  2:08 ` [Bug fortran/65532] " anlauf at gmx dot de
  2015-03-24  2:09 ` dominiq at lps dot ens.fr
@ 2015-03-24  7:44 ` jakub at gcc dot gnu.org
  2015-03-24 11:40 ` mikael at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-24  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-24
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It indeed is r221586.


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
                   ` (2 preceding siblings ...)
  2015-03-24  7:44 ` jakub at gcc dot gnu.org
@ 2015-03-24 11:40 ` mikael at gcc dot gnu.org
  2015-03-24 13:39 ` mikael at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-03-24 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Mikael Morin <mikael at gcc dot gnu.org> ---
With r221586, procedure d1mach is resolved more than once.
At the first time resolve_values is called, the problematic variables (diver,
large, etc)  have a NULL sym->value, which is set afterwards in resolve_data.
On the second call, the value is non-null and the error is produced.


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
                   ` (3 preceding siblings ...)
  2015-03-24 11:40 ` mikael at gcc dot gnu.org
@ 2015-03-24 13:39 ` mikael at gcc dot gnu.org
  2015-03-24 14:09 ` ktkachov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-03-24 13:39 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Morin <mikael at gcc dot gnu.org> changed:

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


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
                   ` (4 preceding siblings ...)
  2015-03-24 13:39 ` mikael at gcc dot gnu.org
@ 2015-03-24 14:09 ` ktkachov at gcc dot gnu.org
  2015-03-25  2:54 ` mikael at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2015-03-24 14:09 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

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

--- Comment #5 from ktkachov at gcc dot gnu.org ---
As noted in 64952, this prevents 481.wrf from SPEC2006 being built


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
                   ` (5 preceding siblings ...)
  2015-03-24 14:09 ` ktkachov at gcc dot gnu.org
@ 2015-03-25  2:54 ` mikael at gcc dot gnu.org
  2015-03-25 11:08 ` mikael at gcc dot gnu.org
  2015-03-26 13:01 ` mikael at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-03-25  2:54 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
                URL|                            |https://gcc.gnu.org/ml/gcc-
                   |                            |patches/2015-03/msg01272.ht
                   |                            |ml

--- Comment #6 from Mikael Morin <mikael at gcc dot gnu.org> ---
Patch posted:
https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01272.html


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
                   ` (6 preceding siblings ...)
  2015-03-25  2:54 ` mikael at gcc dot gnu.org
@ 2015-03-25 11:08 ` mikael at gcc dot gnu.org
  2015-03-26 13:01 ` mikael at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-03-25 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Mikael Morin <mikael at gcc dot gnu.org> ---
Author: mikael
Date: Wed Mar 25 10:15:46 2015
New Revision: 221657

URL: https://gcc.gnu.org/viewcvs?rev=221657&root=gcc&view=rev
Log:
Fix regression introduced at revision 221586.

    PR fortran/64952
    PR fortran/65532
fortran/
    * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
    * resolve.c (resolve_types): Return early if field 'types_resolved'
    is set.  Set 'types_resolved' at the end.
testsuite/
    * gfortran.dg/data_initialized_3.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/data_initialized_3.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/65532] [5 Regression] Unexpected error with legacy code (D1MACH)
  2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
                   ` (7 preceding siblings ...)
  2015-03-25 11:08 ` mikael at gcc dot gnu.org
@ 2015-03-26 13:01 ` mikael at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: mikael at gcc dot gnu.org @ 2015-03-26 13:01 UTC (permalink / raw)
  To: gcc-bugs

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

Mikael Morin <mikael at gcc dot gnu.org> changed:

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

--- Comment #8 from Mikael Morin <mikael at gcc dot gnu.org> ---
Fixed.  Closing.


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

end of thread, other threads:[~2015-03-26 12:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24  0:55 [Bug fortran/65532] New: [5 Regression] Unexpected error with legacy code (D1MACH) anlauf at gmx dot de
2015-03-24  2:08 ` [Bug fortran/65532] " anlauf at gmx dot de
2015-03-24  2:09 ` dominiq at lps dot ens.fr
2015-03-24  7:44 ` jakub at gcc dot gnu.org
2015-03-24 11:40 ` mikael at gcc dot gnu.org
2015-03-24 13:39 ` mikael at gcc dot gnu.org
2015-03-24 14:09 ` ktkachov at gcc dot gnu.org
2015-03-25  2:54 ` mikael at gcc dot gnu.org
2015-03-25 11:08 ` mikael at gcc dot gnu.org
2015-03-26 13:01 ` mikael 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).