[Bug fortran/71032] New: explicit interface and must not have attributes generates gfortran: internal compiler error: Abort trap: 6 (program f951)

kendrick.killian at colostate dot edu gcc-bugzilla@gcc.gnu.org
Mon May 9 19:30:00 GMT 2016


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

            Bug ID: 71032
           Summary: explicit interface and must not have attributes
                    generates gfortran: internal compiler error: Abort
                    trap: 6 (program f951)
           Product: gcc
           Version: 5.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kendrick.killian at colostate dot edu
  Target Milestone: ---

Created attachment 38458
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38458&action=edit
source file that generates f951 Segmentation fault

I had a routine that typed a function and declared it as external. I added the
function as an "contains" routine. An obvious over specification. The compiler
issued the
error message, Procedure ... has an explicit interface and must not have
attributes declared
 the following error messages:
-----------------------
-----------------------

GCC VERSION:
gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin14/5.2.0/lto-wrapper
Target: x86_64-apple-darwin14
Configured with: ../gcc-5.2.0/configure --prefix=/usr/local/gfortran
--with-gmp=/Users/fx/devel/gcc/deps-static/x86_64
--enable-languages=c,c++,fortran,objc,obj-c++ --build=x86_64-apple-darwin14
Thread model: posix
gcc version 5.2.0 (GCC) 

system type:
  Model Name:   MacBook Pro
  Model Identifier:     MacBookPro8,2
  Processor Name:       Intel Core i7
  System Version:       OS X 10.11.4 (15E65)
  Kernel Version:       Darwin 15.4.0
  Developer Tools:
    Version:    7.3.1 (7D1014)
    Location:   /Applications/Xcode.app

Compile Command:
gfortran -O3  -fno-underscoring -Wunused -Waliasing -Wampersand -Wsurprising
-Wno-tabs  -c internalerr.f90


compiler output:
catanf.f:5.28:
    Included at internalerr.f90:40:

      real function carctanf(x,a,b,c,d)
                            1
internalerr.f90:25.39:

      real     agdrat, bgdrat, carctanf
                                       2
Error: Procedure 'carctanf' at (1) has an explicit interface and must not have
attributes declared at (2)
f951: internal compiler error: Segmentation fault: 11

f951: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Files:
Sorry I don't know where preprocessed file (*.i*) is
The short attached source file generate the error.


More information about the Gcc-bugs mailing list