public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/16606] New: gfortran error with a valid derived type definition
@ 2004-07-17 14:39 deji_aking at yahoo dot ca
2004-07-17 17:39 ` [Bug fortran/16606] " pinskia at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: deji_aking at yahoo dot ca @ 2004-07-17 14:39 UTC (permalink / raw)
To: gcc-bugs
gfortran gives the following error
>>
f95 -xf95-cpp-input -I/usr/include -L/usr/lib -lnetcdf -c mo_mz_regrid_base.f90
In file mo_mz_regrid_base.f90:51
TYPE narray
1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
make[1]: *** [mo_mz_regrid_base.o] Error 1
<<
Below is a snip of mo_mz_regrid_base.f90 where the error is activated
>>
TYPE narray
! n-dimenional array as 1D (LINEAR) array (REAL)
INTEGER :: n = 0 ! number of dimensions
INTEGER, DIMENSION(:), POINTER :: dim => NULL()! dim. vector
REAL (SP) , DIMENSION(:), POINTER :: vr => NULL() ! real values
REAL (DP) , DIMENSION(:), POINTER :: vd => NULL() ! double values
INTEGER (I8), DIMENSION(:), POINTER :: vi => NULL() ! integer values
INTEGER (I4), DIMENSION(:), POINTER :: vb => NULL() ! byte values
CHARACTER, DIMENSION(:), POINTER :: vc => NULL() ! char. values
END TYPE narray
TYPE axis
! hyper-axis (for curvilinear coordinates)
TYPE (narray) :: dat ! interface bounds
LOGICAL :: lm = .false. ! modulo axis ?
INTEGER :: ndp = 0 ! number of dependencies
! FIRST IN LIST MUST BE INDEPENDENT !!!
! E.G. IF DIM 3 DEPENDS ON DIM 1,2, and 5
! dep = (/ 3,1,2,5 /)
INTEGER, DIMENSION(:), POINTER :: dep => NULL() ! dependencies
END TYPE axis
<<
--
Summary: gfortran error with a valid derived type definition
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: deji_aking at yahoo dot ca
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
@ 2004-07-17 17:39 ` pinskia at gcc dot gnu dot org
2004-07-17 22:55 ` deji_aking at yahoo dot ca
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-17 17:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-17 17:39 -------
Can you provide the whole source?
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
2004-07-17 17:39 ` [Bug fortran/16606] " pinskia at gcc dot gnu dot org
@ 2004-07-17 22:55 ` deji_aking at yahoo dot ca
2004-07-18 14:20 ` tobi at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: deji_aking at yahoo dot ca @ 2004-07-17 22:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From deji_aking at yahoo dot ca 2004-07-17 22:55 -------
Created an attachment (id=6770)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6770&action=view)
mo_mz_regrid_base.F90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
2004-07-17 17:39 ` [Bug fortran/16606] " pinskia at gcc dot gnu dot org
2004-07-17 22:55 ` deji_aking at yahoo dot ca
@ 2004-07-18 14:20 ` tobi at gcc dot gnu dot org
2004-07-18 14:24 ` tobi at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-18 14:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-07-18 14:20 -------
Reduced testcase:
SUBROUTINE N
TYPE narray
CHARACTER, DIMENSION(:), POINTER :: vc => NULL()
END TYPE narray
TYPE (narray), DIMENSION(:), POINTER :: pd
END SUBROUTINE N
I'm not sure if this is compliant, therefor not confirmed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
` (2 preceding siblings ...)
2004-07-18 14:20 ` tobi at gcc dot gnu dot org
@ 2004-07-18 14:24 ` tobi at gcc dot gnu dot org
2004-12-03 15:08 ` paulthomas2 at wanadoo dot fr
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-07-18 14:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From tobi at gcc dot gnu dot org 2004-07-18 14:24 -------
Further reduced to:
TYPE n
CHARACTER, POINTER :: vc => NULL()
END TYPE n
TYPE (n), POINTER :: pd
END
this is, I believe, indeed valid. Therefor confirmed this time.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-07-18 14:24:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
` (3 preceding siblings ...)
2004-07-18 14:24 ` tobi at gcc dot gnu dot org
@ 2004-12-03 15:08 ` paulthomas2 at wanadoo dot fr
2005-05-30 13:08 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2004-12-03 15:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From paulthomas2 at wanadoo dot fr 2004-12-03 15:08 -------
The problem lies with the character pointer in the derived type. Remove the
assignement to null and this example compiles. Try to allocate pd and it fails
again. Change to to fixed length, it is OK, but bombs out again when you
assign something to it. The mixture of derived types and characters seems to
be toxic! CVS 20041202
(In reply to comment #4)
> Further reduced to:
> TYPE n
> CHARACTER, POINTER :: vc => NULL()
> END TYPE n
> TYPE (n), POINTER :: pd
> END
> this is, I believe, indeed valid. Therefor confirmed this time.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
` (4 preceding siblings ...)
2004-12-03 15:08 ` paulthomas2 at wanadoo dot fr
@ 2005-05-30 13:08 ` pinskia at gcc dot gnu dot org
2005-05-30 14:02 ` enok at lysator dot liu dot se
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-30 13:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-30 13:08 -------
*** Bug 21816 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |enok at lysator dot liu dot
| |se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
` (5 preceding siblings ...)
2005-05-30 13:08 ` pinskia at gcc dot gnu dot org
@ 2005-05-30 14:02 ` enok at lysator dot liu dot se
2005-06-18 9:08 ` enok at lysator dot liu dot se
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: enok at lysator dot liu dot se @ 2005-05-30 14:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From enok at lysator dot liu dot se 2005-05-30 13:27 -------
If CHARACTER is replaced by INTEGER the result is the same. Thus, it is not
CHARACTER type pointers that causes the problem.
(In reply to comment #6)
> *** Bug 21816 has been marked as a duplicate of this bug. ***
(In reply to comment #5)
> The problem lies with the character pointer in the derived type. Remove the
> assignement to null and this example compiles. Try to allocate pd and it fails
> again. Change to to fixed length, it is OK, but bombs out again when you
> assign something to it. The mixture of derived types and characters seems to
> be toxic! CVS 20041202
>
> (In reply to comment #4)
> > Further reduced to:
> > TYPE n
> > CHARACTER, POINTER :: vc => NULL()
> > END TYPE n
> > TYPE (n), POINTER :: pd
> > END
> > this is, I believe, indeed valid. Therefor confirmed this time.
>
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
` (6 preceding siblings ...)
2005-05-30 14:02 ` enok at lysator dot liu dot se
@ 2005-06-18 9:08 ` enok at lysator dot liu dot se
2005-06-18 18:31 ` fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: enok at lysator dot liu dot se @ 2005-06-18 9:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From enok at lysator dot liu dot se 2005-06-18 09:08 -------
The problem seems to appear with pointer declaration to a derived type with any
kind of member initialization. The following code fails too:
SUBROUTINE N
TYPE T
INTEGER :: I = 0
END TYPE T
TYPE(T), POINTER :: P
END SUBROUTINE N
This bug is breaking my code completely. Is there any workaround?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
` (7 preceding siblings ...)
2005-06-18 9:08 ` enok at lysator dot liu dot se
@ 2005-06-18 18:31 ` fxcoudert at gcc dot gnu dot org
2005-09-16 23:08 ` erik dot edelmann at iki dot fi
2005-09-19 8:18 ` reichelt at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-06-18 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From fxcoudert at gcc dot gnu dot org 2005-06-18 18:31 -------
*** Bug 22101 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |d dot m dot Ingram at MMU
| |dot ac dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
` (8 preceding siblings ...)
2005-06-18 18:31 ` fxcoudert at gcc dot gnu dot org
@ 2005-09-16 23:08 ` erik dot edelmann at iki dot fi
2005-09-19 8:18 ` reichelt at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: erik dot edelmann at iki dot fi @ 2005-09-16 23:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From erik dot edelmann at iki dot fi 2005-09-16 23:08 -------
Patch posted to the mailing list:
http://gcc.gnu.org/ml/gcc-patches/2005-09/msg01032.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/16606] gfortran error with a valid derived type definition
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
` (9 preceding siblings ...)
2005-09-16 23:08 ` erik dot edelmann at iki dot fi
@ 2005-09-19 8:18 ` reichelt at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-19 8:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-09-19 08:18 -------
*** This bug has been marked as a duplicate of 15975 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16606
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-09-19 8:18 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-17 14:39 [Bug fortran/16606] New: gfortran error with a valid derived type definition deji_aking at yahoo dot ca
2004-07-17 17:39 ` [Bug fortran/16606] " pinskia at gcc dot gnu dot org
2004-07-17 22:55 ` deji_aking at yahoo dot ca
2004-07-18 14:20 ` tobi at gcc dot gnu dot org
2004-07-18 14:24 ` tobi at gcc dot gnu dot org
2004-12-03 15:08 ` paulthomas2 at wanadoo dot fr
2005-05-30 13:08 ` pinskia at gcc dot gnu dot org
2005-05-30 14:02 ` enok at lysator dot liu dot se
2005-06-18 9:08 ` enok at lysator dot liu dot se
2005-06-18 18:31 ` fxcoudert at gcc dot gnu dot org
2005-09-16 23:08 ` erik dot edelmann at iki dot fi
2005-09-19 8:18 ` reichelt 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).