Bug 22101 - use of type(x), pointer:: next => null() causes compilation to fail with a spurious error message
Summary: use of type(x), pointer:: next => null() causes compilation to fail with a sp...
Status: RESOLVED DUPLICATE of bug 16606
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 16606 21370
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-17 06:06 UTC by David Ingram
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: powerpc-apple-darwin7.8.0
Target: powerpc-apple-darwin7.8.0
Build: powerpc-apple-darwin7.8.0
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Fortran source which causes the error (19.54 KB, application/octet-stream)
2005-06-17 06:08 UTC, David Ingram
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Ingram 2005-06-17 06:06:52 UTC
Compilation of the attached F90 module which uses liked lists, causes the following error message to 
appear repeatedly. removing the use of => null() to initialise the pointers causes comilation to suceed. 
The code compiles sucesfully under compac visual fortran on a PC and Pro Fortran on an SGI system.

The output from "gfortran -v -save-temps -c CutCellRoutines.f90" is

Using built-in specs.
Target: powerpc-apple-darwin7.8.0
Configured with: ../gcc/configure --prefix=/usr/local/gfortran --enable-languages=c,f95
Thread model: posix
gcc version 4.1.0 20050325 (experimental)
 /usr/local/gfortran/libexec/gcc/powerpc-apple-darwin7.8.0/4.1.0/f951 CutCellRoutines.f90 -fPIC 
-quiet -dumpbase CutCellRoutines.f90 -auxbase CutCellRoutines -version -o CutCellRoutines.s
GNU F95 version 4.1.0 20050325 (experimental) (powerpc-apple-darwin7.8.0)
        compiled by GNU C version 3.3 20030304 (Apple Computer, Inc. build 1640).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 In file CutCellRoutines.f90:35

  type solid_body_node
                     1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
 In file CutCellRoutines.f90:35

  type solid_body_node
                     1
Error: Pointer assignment target is neither TARGET nor POINTER at (1)
 In file CutCellRoutines.f90:35

(*** error repeated 8 times ***)
Comment 1 David Ingram 2005-06-17 06:08:19 UTC
Created attachment 9103 [details]
Fortran source which causes the error
Comment 2 Andrew Pinski 2005-06-17 14:47:25 UTC
This is most likely the same bug as PR 16606 or PR 21370 but since I have not reduced it yet, I don't 
know which one for sure. 
Comment 3 Francois-Xavier Coudert 2005-06-18 18:31:00 UTC
Reduction of this one:

  type solid
    integer :: i = 0
  end type solid
  type(solid), pointer :: a
  end

so, this is indeed PR 16606. Thanks for reporting!

*** This bug has been marked as a duplicate of 16606 ***