- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The following produces an Internal Compiler Error with ifort 12.0.3.174 on Ubuntu 10.10.
The trigger seems to be passing a null( ) as an actual argument to its corresponding dummy argument class(*).
Passing argument other than null() seems to work though.
======= begin test.F90 ==========
======= end test.F90 ==========
I couldn't reduce it to a simpler testcase, but I think this is small enough.
Thanks,
-- Satish.BD
The following produces an Internal Compiler Error with ifort 12.0.3.174 on Ubuntu 10.10.
The trigger seems to be passing a null( ) as an actual argument to its corresponding dummy argument class(*).
Passing argument other than null() seems to work though.
======= begin test.F90 ==========
[fortran]module m_type
implicit none
type :: t_type
real :: x
contains
procedure :: eval_square
end type t_type
abstract interface
real function real_function(object, point)
class(*) :: object
real, intent(in) :: point
end function real_function
end interface
contains
real function eval_square(self, x)
class(t_type) :: self
real, intent(in) :: x
eval_square = x**2
end function eval_square
real function find_roots(func, approx, object)
procedure(real_function) :: func
real, intent(in) :: approx
class(*), optional :: object
find_roots = func(object, approx)
end function find_roots
end module m_type
program main
use m_type
implicit none
type(t_type) :: t
real :: root
root = find_roots(eval_square, 10.0, null()) ! Replace null() by 't' and the ICE is gone !
end program main
[/fortran] ======= end test.F90 ==========
I couldn't reduce it to a simpler testcase, but I think this is small enough.
Thanks,
-- Satish.BD
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting this problem. The use of NULL() as an actual argument where the dummy argument is OPTIONAL is a feature that is new in Fortran 2008 and which Intel Fortran does not yet support. If you remove the null() argument it works as you expect.
I'll report the issue of the ICE, which is always wrong, but I suggest that you remove the null() argument for now and just pass two arguments. Issue ID for the ICE is DPD200168881.
I'll report the issue of the ICE, which is always wrong, but I suggest that you remove the null() argument for now and just pass two arguments. Issue ID for the ICE is DPD200168881.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for reporting this problem. The use of NULL() as an actual argument where the dummy argument is OPTIONAL is a feature that is new in Fortran 2008 and which Intel Fortran does not yet support. If you remove the null() argument it works as you expect.
I'll report the issue of the ICE, which is always wrong, but I suggest that you remove the null() argument for now and just pass two arguments. Issue ID for the ICE is DPD200168881.
I'll report the issue of the ICE, which is always wrong, but I suggest that you remove the null() argument for now and just pass two arguments. Issue ID for the ICE is DPD200168881.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fixed in a future release.
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