This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/29441] New: mathematical functions and constant expressions


Hi
  conside the following code

$cat const_math_func.f90
program printpi
  ! This program is not standard complaint
  real, parameter :: pi = 4.0*atan(1.0)
  write(*,*) pi
end program

This code is not Fortran 95 standard compliant (
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/11eeb6ec2896183c/95d5ab27eb5e94e9#95d5ab27eb5e94e9
). But still gfortran does not give any errors/warning when compiling this
code.

$gfortran -Wall -std=f95 const_math_func.f90

$./a.out
   3.141593

$gfortran -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)


-- 
           Summary: mathematical functions and constant expressions
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kamaraju at gmail dot com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]