- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to get a coworker to standardize on ifort 11 for some features I need, but he's found some bugs that are show-stoppers for some of his code. Below are his examples. Note that gfortran and ifort10 both work fine with both of them. Can anyone help me confirm this as an ifort bug or point me to the appropriate fortran standard that explains why it shouldn't compile
Example 1:
program showthebug
implicit none
real :: a(1)
integer :: ia
a = 1.
ia = 1
call subb( a )
call subb( (/ real(ia) /) )
contains
subroutine subb( arg )
real, dimension(:), intent(in) :: arg
print *, 'size(arg) ', size(arg)
print *, 'maxval(arg) ', maxval(arg)
end subroutine subb
end program showthebug
~/docs/fortran 132: ifort showthebug.f90
showthebug.f90(8): error #5082: Syntax error, found ')' when expecting
one of: (
...
call subba( (/ real(ia) /) )
---------------------------^
compilation aborted for showthebug.f90 (code 1)
Example 2:
module dump_0
implicit none
private
public :: dump
interface dump
module procedure dumpInts
end interface
contains
subroutine dumpInts( array )
integer, dimension(:), intent(in) :: array
integer :: i
do i=1, size(array)
print *, array(i)
enddo
end subroutine dumpInts
end module dump_0
module aModule
use dump_0, only: dump
implicit none
private
public :: a_t, dump
interface dump
module procedure dumpOne
end interface
type a_t
character(len=8) :: NAME
integer, dimension(1) :: values
end type a_t
contains
subroutine dumpOne( a )
type(a_t), intent(in) :: a
call dump( a%values )
end subroutine dumpOne
end module aModule
module bModule
use aModule, only: a_t, dump
implicit none
private
public :: b_t, dump
interface dump
module procedure dumpOne
end interface
type b_t
logical :: guilty
type(a_t) :: a
integer, dimension(1) :: values
end type b_t
contains
subroutine dumpOne( b )
use dump_0, only: dump
type(b_t), intent(in) :: b
call dump( b%values )
call dump(b%a)
end subroutine dumpOne
end module bModule
and on compilation v11 of ifort complains
~/docs/fortran 126: ifort -c dump_0.f90 ; ifort -c aModule.f90 ; ifort
-c bModule.f90
bModule.f90(18): error #8032: Generic procedure reference has two or
more specific procedure with the same type/rank/keyword signature.
[AMODULE^DUMP_0^DUMPINTS]
call dump( b%values )
---------^
compilation aborted for bModule.f90 (code 1)
Example 1:
program showthebug
implicit none
real :: a(1)
integer :: ia
a = 1.
ia = 1
call subb( a )
call subb( (/ real(ia) /) )
contains
subroutine subb( arg )
real, dimension(:), intent(in) :: arg
print *, 'size(arg) ', size(arg)
print *, 'maxval(arg) ', maxval(arg)
end subroutine subb
end program showthebug
~/docs/fortran 132: ifort showthebug.f90
showthebug.f90(8): error #5082: Syntax error, found ')' when expecting
one of: (
call subba( (/ real(ia) /) )
---------------------------^
compilation aborted for showthebug.f90 (code 1)
Example 2:
module dump_0
implicit none
private
public :: dump
interface dump
module procedure dumpInts
end interface
contains
subroutine dumpInts( array )
integer, dimension(:), intent(in) :: array
integer :: i
do i=1, size(array)
print *, array(i)
enddo
end subroutine dumpInts
end module dump_0
module aModule
use dump_0, only: dump
implicit none
private
public :: a_t, dump
interface dump
module procedure dumpOne
end interface
type a_t
character(len=8) :: NAME
integer, dimension(1) :: values
end type a_t
contains
subroutine dumpOne( a )
type(a_t), intent(in) :: a
call dump( a%values )
end subroutine dumpOne
end module aModule
module bModule
use aModule, only: a_t, dump
implicit none
private
public :: b_t, dump
interface dump
module procedure dumpOne
end interface
type b_t
logical :: guilty
type(a_t) :: a
integer, dimension(1) :: values
end type b_t
contains
subroutine dumpOne( b )
use dump_0, only: dump
type(b_t), intent(in) :: b
call dump( b%values )
call dump(b%a)
end subroutine dumpOne
end module bModule
and on compilation v11 of ifort complains
~/docs/fortran 126: ifort -c dump_0.f90 ; ifort -c aModule.f90 ; ifort
-c bModule.f90
bModule.f90(18): error #8032: Generic procedure reference has two or
more specific procedure with the same type/rank/keyword signature.
[AMODULE^DUMP_0^DUMPINTS]
call dump( b%values )
---------^
compilation aborted for bModule.f90 (code 1)
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Awsome, thanks for the quick response. Any ideas on Example 2? Example 1 he acutally said he could work around, but example two is a bigger problem in our code.
Quoting - acarheden
Quoting - acarheden
I'm trying to get a coworker to standardize on ifort 11 for some features I need, but he's found some bugs that are show-stoppers for some of his code. Below are his examples. Note that gfortran and ifort10 both work fine with both of them. Can anyone help me confirm this as an ifort bug or point me to the appropriate fortran standard that explains why it shouldn't compile
Example 1:
program showthebug
implicit none
real :: a(1)
integer :: ia
a = 1.
ia = 1
call subb( a )
call subb( (/ real(ia) /) )
contains
subroutine subb( arg )
real, dimension(:), intent(in) :: arg
print *, 'size(arg) ', size(arg)
print *, 'maxval(arg) ', maxval(arg)
end subroutine subb
end program showthebug
~/docs/fortran 132: ifort showthebug.f90
showthebug.f90(8): error #5082: Syntax error, found ')' when expecting
one of: (
...
call subba( (/ real(ia) /) )
---------------------------^
compilation aborted for showthebug.f90 (code 1)
Example 2:
module dump_0
implicit none
private
public :: dump
interface dump
module procedure dumpInts
end interface
contains
subroutine dumpInts( array )
integer, dimension(:), intent(in) :: array
integer :: i
do i=1, size(array)
print *, array(i)
enddo
end subroutine dumpInts
end module dump_0
module aModule
use dump_0, only: dump
implicit none
private
public :: a_t, dump
interface dump
module procedure dumpOne
end interface
type a_t
character(len=8) :: NAME
integer, dimension(1) :: values
end type a_t
contains
subroutine dumpOne( a )
type(a_t), intent(in) :: a
call dump( a%values )
end subroutine dumpOne
end module aModule
module bModule
use aModule, only: a_t, dump
implicit none
private
public :: b_t, dump
interface dump
module procedure dumpOne
end interface
type b_t
logical :: guilty
type(a_t) :: a
integer, dimension(1) :: values
end type b_t
contains
subroutine dumpOne( b )
use dump_0, only: dump
type(b_t), intent(in) :: b
call dump( b%values )
call dump(b%a)
end subroutine dumpOne
end module bModule
and on compilation v11 of ifort complains
~/docs/fortran 126: ifort -c dump_0.f90 ; ifort -c aModule.f90 ; ifort
-c bModule.f90
bModule.f90(18): error #8032: Generic procedure reference has two or
more specific procedure with the same type/rank/keyword signature.
[AMODULE^DUMP_0^DUMPINTS]
call dump( b%values )
---------^
compilation aborted for bModule.f90 (code 1)
Example 1:
program showthebug
implicit none
real :: a(1)
integer :: ia
a = 1.
ia = 1
call subb( a )
call subb( (/ real(ia) /) )
contains
subroutine subb( arg )
real, dimension(:), intent(in) :: arg
print *, 'size(arg) ', size(arg)
print *, 'maxval(arg) ', maxval(arg)
end subroutine subb
end program showthebug
~/docs/fortran 132: ifort showthebug.f90
showthebug.f90(8): error #5082: Syntax error, found ')' when expecting
one of: (
call subba( (/ real(ia) /) )
---------------------------^
compilation aborted for showthebug.f90 (code 1)
Example 2:
module dump_0
implicit none
private
public :: dump
interface dump
module procedure dumpInts
end interface
contains
subroutine dumpInts( array )
integer, dimension(:), intent(in) :: array
integer :: i
do i=1, size(array)
print *, array(i)
enddo
end subroutine dumpInts
end module dump_0
module aModule
use dump_0, only: dump
implicit none
private
public :: a_t, dump
interface dump
module procedure dumpOne
end interface
type a_t
character(len=8) :: NAME
integer, dimension(1) :: values
end type a_t
contains
subroutine dumpOne( a )
type(a_t), intent(in) :: a
call dump( a%values )
end subroutine dumpOne
end module aModule
module bModule
use aModule, only: a_t, dump
implicit none
private
public :: b_t, dump
interface dump
module procedure dumpOne
end interface
type b_t
logical :: guilty
type(a_t) :: a
integer, dimension(1) :: values
end type b_t
contains
subroutine dumpOne( b )
use dump_0, only: dump
type(b_t), intent(in) :: b
call dump( b%values )
call dump(b%a)
end subroutine dumpOne
end module bModule
and on compilation v11 of ifort complains
~/docs/fortran 126: ifort -c dump_0.f90 ; ifort -c aModule.f90 ; ifort
-c bModule.f90
bModule.f90(18): error #8032: Generic procedure reference has two or
more specific procedure with the same type/rank/keyword signature.
[AMODULE^DUMP_0^DUMPINTS]
call dump( b%values )
---------^
compilation aborted for bModule.f90 (code 1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oops - overlooked that one. I'll get back to you on that.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page