Created attachment 337064 [details] first (working) source file Description of problem: gfortran issues an error when compiling functions returning a char that have the RESULT keyword, as in: function charfun6 (input) result(output) bind(c,name="charfun6") whereas the following syntax, that means exactly the same: function return_char(i) bind(C,name='return_char') does compile correctly. This bug was discoverd in the following thread in comp.lang.fortran: http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/037fa9f3c24ddfa6 Version-Release number of selected component (if applicable): $ gfortran -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=x86_64-redhat-linux Thread model: posix gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) How reproducible: Compile the attached files charfun6.f90 and charfun7.f90, both are equivalent, so should work. Steps to Reproduce: 1. $ gfortran -c charfun6.f90 2. $ gfortran -c charfun7.f90 Actual results: gfortran issues the following warning: $ gfortran -c charfun7.f90 charfun7.f90: In function ‘return_char’: charfun7.f90:7: error: aggregate value used where an integer was expected Expected results: no error Additional info:
Created attachment 337065 [details] source file that triggers compiler error
Should be fixed in gcc-4.4.0-0.31 in rawhide.