public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39519]  New: bad assignment to type with allocatable component
@ 2009-03-22 10:45 gilbert dot scott at easynet dot co dot uk
  2009-03-22 10:53 ` [Bug fortran/39519] " dominiq at lps dot ens dot fr
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: gilbert dot scott at easynet dot co dot uk @ 2009-03-22 10:45 UTC (permalink / raw)
  To: gcc-bugs

GNU Fortran (GCC) 4.4.0 20090219 (experimental) [trunk revision 144289]

The code below generates the output:
T2%A = 42
This is wrong, the output should be:
T2%A = 23

PROGRAM X
TYPE T
INTEGER, POINTER :: P
INTEGER, ALLOCATABLE :: A(:)
END TYPE T
TYPE(T) :: T1,T2
ALLOCATE ( T1%A(1) )
ALLOCATE ( T2%A(1) )
T1%A = 23
T2 = T1
T1%A = 42
PRINT *, 'T2%A = ',T2%A
END PROGRAM X


-- 
           Summary: bad assignment to type with allocatable component
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gilbert dot scott at easynet dot co dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
@ 2009-03-22 10:53 ` dominiq at lps dot ens dot fr
  2009-03-22 10:58 ` [Bug fortran/39519] [4,4 Regression] " steven at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-03-22 10:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dominiq at lps dot ens dot fr  2009-03-22 10:53 -------
Confirmed on (powerpc|i686)-apple-darwin9 with trunk and 4.3.3. This a
regression since 4.2.3 gives the expected output (along with ifort and g95).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4,4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
  2009-03-22 10:53 ` [Bug fortran/39519] " dominiq at lps dot ens dot fr
@ 2009-03-22 10:58 ` steven at gcc dot gnu dot org
  2009-03-22 11:14 ` [Bug fortran/39519] [4.4 " dominiq at lps dot ens dot fr
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-03-22 10:58 UTC (permalink / raw)
  To: gcc-bugs



-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
      Known to fail|                            |4.4.0
      Known to work|                            |4.2.3
   Last reconfirmed|0000-00-00 00:00:00         |2009-03-22 10:58:21
               date|                            |
            Summary|bad assignment to type with |[4,4 Regression] bad
                   |allocatable component       |assignment to type with
                   |                            |allocatable component


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
  2009-03-22 10:53 ` [Bug fortran/39519] " dominiq at lps dot ens dot fr
  2009-03-22 10:58 ` [Bug fortran/39519] [4,4 Regression] " steven at gcc dot gnu dot org
@ 2009-03-22 11:14 ` dominiq at lps dot ens dot fr
  2009-03-22 12:22 ` pault at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-03-22 11:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dominiq at lps dot ens dot fr  2009-03-22 11:14 -------
This PR should probably be marked as [4.3/4.4 Regression].


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (2 preceding siblings ...)
  2009-03-22 11:14 ` [Bug fortran/39519] [4.4 " dominiq at lps dot ens dot fr
@ 2009-03-22 12:22 ` pault at gcc dot gnu dot org
  2009-03-22 17:54 ` pault at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-03-22 12:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pault at gcc dot gnu dot org  2009-03-22 12:22 -------
(In reply to comment #2)
> This PR should probably be marked as [4.3/4.4 Regression].
> 
Dear, oh dear!  This is annoying.  The bug goes away if the first component of
the derived type is anything other than a pointer. Also, interchanging the
components clears the fault too.  The derived type attribute alloc_comp is not
getting set for some reason, to judge by the code.

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (3 preceding siblings ...)
  2009-03-22 12:22 ` pault at gcc dot gnu dot org
@ 2009-03-22 17:54 ` pault at gcc dot gnu dot org
  2009-03-22 18:26 ` hjl dot tools at gmail dot com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-03-22 17:54 UTC (permalink / raw)
  To: gcc-bugs



-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-03-22 10:58:21         |2009-03-22 17:53:52
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (4 preceding siblings ...)
  2009-03-22 17:54 ` pault at gcc dot gnu dot org
@ 2009-03-22 18:26 ` hjl dot tools at gmail dot com
  2009-03-22 21:17 ` steven at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-03-22 18:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2009-03-22 18:26 -------
It is caused by revision 127014:

http://gcc.gnu.org/ml/gcc-cvs/2007-07/msg00878.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (5 preceding siblings ...)
  2009-03-22 18:26 ` hjl dot tools at gmail dot com
@ 2009-03-22 21:17 ` steven at gcc dot gnu dot org
  2009-03-31 16:00 ` [Bug fortran/39519] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-03-22 21:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from steven at gcc dot gnu dot org  2009-03-22 21:17 -------
I think this should be in GCC 4.4 and maybe even in 4.c.  The patch is obvious
enough and it fixes a wrong-code issue.  Language maintainers have some freedom
to fix bugs even on release branches (so also certainly on the trunk), I
suggest the patch contributor uses it...


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2009-
                   |                            |03/msg01000.html


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.3/4.4/4.5 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (6 preceding siblings ...)
  2009-03-22 21:17 ` steven at gcc dot gnu dot org
@ 2009-03-31 16:00 ` jsm28 at gcc dot gnu dot org
  2009-03-31 19:44 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 16:00 UTC (permalink / raw)
  To: gcc-bugs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.4/4.5 Regression] bad    |[4.3/4.4/4.5 Regression] bad
                   |assignment to type with     |assignment to type with
                   |allocatable component       |allocatable component
   Target Milestone|---                         |4.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.3/4.4/4.5 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (7 preceding siblings ...)
  2009-03-31 16:00 ` [Bug fortran/39519] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
@ 2009-03-31 19:44 ` jakub at gcc dot gnu dot org
  2009-03-31 19:51 ` pault at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-31 19:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2009-03-31 19:43 -------
So was this indeed fixed by
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145195
If so, it should be closed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.3/4.4/4.5 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (8 preceding siblings ...)
  2009-03-31 19:44 ` jakub at gcc dot gnu dot org
@ 2009-03-31 19:51 ` pault at gcc dot gnu dot org
  2009-04-04 13:19 ` [Bug fortran/39519] [4.3/4.4 " pault at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-03-31 19:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2009-03-31 19:50 -------
(In reply to comment #6)
> So was this indeed fixed by
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145195
> If so, it should be closed.
> 
Jakub,

For the second time in the last few days, I have screwed up on the commit
message and this time the ChangeLog.  At present this PR is fixed on 4.5.  I
will do the honours on 4.4 and 4.3 this weekend.

Cheers

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.3/4.4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (9 preceding siblings ...)
  2009-03-31 19:51 ` pault at gcc dot gnu dot org
@ 2009-04-04 13:19 ` pault at gcc dot gnu dot org
  2009-04-04 14:47 ` pault at gcc dot gnu dot org
  2009-04-04 14:50 ` pault at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-04-04 13:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pault at gcc dot gnu dot org  2009-04-04 13:19 -------
Subject: Bug 39519

Author: pault
Date: Sat Apr  4 13:19:15 2009
New Revision: 145538

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145538
Log:
2009-04-04  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/39519
        * parse.c (parse_derived): Do not break on finding pointer,
        allocatable or private components.

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

        PR fortran/39519
        * gfortran.dg/alloc_comp_assign_9.f90: New test.


Added:
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f90
Modified:
    branches/gcc-4_4-branch/gcc/fortran/ChangeLog
    branches/gcc-4_4-branch/gcc/fortran/parse.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.3/4.4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (10 preceding siblings ...)
  2009-04-04 13:19 ` [Bug fortran/39519] [4.3/4.4 " pault at gcc dot gnu dot org
@ 2009-04-04 14:47 ` pault at gcc dot gnu dot org
  2009-04-04 14:50 ` pault at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-04-04 14:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pault at gcc dot gnu dot org  2009-04-04 14:47 -------
Subject: Bug 39519

Author: pault
Date: Sat Apr  4 14:47:23 2009
New Revision: 145540

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145540
Log:
2009-04-04  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/39519
        * parse.c (parse_derived): Do not break on finding pointer,
        allocatable or private components.

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

        PR fortran/39519
        * gfortran.dg/alloc_comp_assign_9.f90: New test.


Added:
    branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/alloc_comp_assign_9.f90
Modified:
    branches/gcc-4_3-branch/gcc/fortran/ChangeLog
    branches/gcc-4_3-branch/gcc/fortran/parse.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

* [Bug fortran/39519] [4.3/4.4 Regression] bad assignment to type with allocatable component
  2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
                   ` (11 preceding siblings ...)
  2009-04-04 14:47 ` pault at gcc dot gnu dot org
@ 2009-04-04 14:50 ` pault at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-04-04 14:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pault at gcc dot gnu dot org  2009-04-04 14:50 -------
Fixed on trunk, 4.4 and 4.3.

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39519


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

end of thread, other threads:[~2009-04-04 14:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-22 10:45 [Bug fortran/39519] New: bad assignment to type with allocatable component gilbert dot scott at easynet dot co dot uk
2009-03-22 10:53 ` [Bug fortran/39519] " dominiq at lps dot ens dot fr
2009-03-22 10:58 ` [Bug fortran/39519] [4,4 Regression] " steven at gcc dot gnu dot org
2009-03-22 11:14 ` [Bug fortran/39519] [4.4 " dominiq at lps dot ens dot fr
2009-03-22 12:22 ` pault at gcc dot gnu dot org
2009-03-22 17:54 ` pault at gcc dot gnu dot org
2009-03-22 18:26 ` hjl dot tools at gmail dot com
2009-03-22 21:17 ` steven at gcc dot gnu dot org
2009-03-31 16:00 ` [Bug fortran/39519] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
2009-03-31 19:44 ` jakub at gcc dot gnu dot org
2009-03-31 19:51 ` pault at gcc dot gnu dot org
2009-04-04 13:19 ` [Bug fortran/39519] [4.3/4.4 " pault at gcc dot gnu dot org
2009-04-04 14:47 ` pault at gcc dot gnu dot org
2009-04-04 14:50 ` pault at gcc dot gnu dot 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).