[Bug fortran/30793] Segfault on calling a function returning a pointer

dominiq at lps dot ens dot fr gcc-bugzilla@gcc.gnu.org
Wed Feb 14 19:00:00 GMT 2007



------- Comment #3 from dominiq at lps dot ens dot fr  2007-02-14 19:00 -------
For both test cases, xlf gives:

** class_mesh   === End of Compilation 1 ===
** class_field   === End of Compilation 2 ===
"pr30793.f90", line 127.5: 1515-039 (S) The target in the pointer assignment
must have the TARGET or POINTER attribute.
"pr30793.f90", 1513-083 (E) Internal or module function get_scalar_field_msh
was not set within the function.
** class_scalar_field   === End of Compilation 3 ===
"pr30793.f90", line 134.7: 1514-219 (S) Unable to access module symbol file for
module class_scalar_field. Check path and file permissions of file. Use
association not done for this module.
1501-511  Compilation failed for file pr30793.f90.

(first test case) and

** class_mesh   === End of Compilation 1 ===
** class_field   === End of Compilation 2 ===
"pr30793_1.f90", line 38.5: 1515-039 (S) The target in the pointer assignment
must have the TARGET or POINTER attribute.
"pr30793_1.f90", 1513-083 (E) Internal or module function get_scalar_field_msh
was not set within the function.
** class_scalar_field   === End of Compilation 3 ===
"pr30793_1.f90", line 44.7: 1514-220 (S) Module symbol file for module
class_scalar_field is in a format not recognized by this compiler. Please
compile the module with this compiler.
1501-511  Compilation failed for file pr30793_1.f90.

(second test case) and g95 gives:

In file pr30793.f90:89

  interface msh_
            1
Error: Generic interface 'msh_' at (1) cannot have the POINTER attribute
In file pr30793.f90:90

    module procedure get_scalar_field_msh
                     1
Error: MODULE PROCEDURE at (1) must be in a generic module interface
In file pr30793.f90:91

  end interface
     1
Error: Expecting END MODULE statement at (1)

(first test case) and

In file pr30793_1.f90:30

  interface msh_
            1
Error: Generic interface 'msh_' at (1) cannot have the POINTER attribute
In file pr30793_1.f90:31

    module procedure get_scalar_field_msh
                     1
Error: MODULE PROCEDURE at (1) must be in a generic module interface
In file pr30793_1.f90:32

  end interface
     1
Error: Expecting END MODULE statement at (1)

(second test case).  I don't know if they are right, but the errors may give a
clue.


-- 

dominiq at lps dot ens dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet| i686-pc-linux-gnu          |i686-pc-linux-gnu
   GCC host triplet| i686-pc-linux-gnu          |i686-pc-linux-gnu
 GCC target triplet| i686-pc-linux-gnu          |i686-pc-linux-gnu


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



More information about the Gcc-bugs mailing list