Compilation error

Paul Richard Thomas paul.richard.thomas@gmail.com
Tue Oct 4 11:56:00 GMT 2011


No - it is just that there are not too many F2003 compilers out there,
let alone F2008.  gfortran tends to introduce minor F2008 features
before other compilers.  Use -std=f2003 or f95 to make sure.

Cheers

Paul

On Tue, Oct 4, 2011 at 1:50 PM, Daniel Carrera <dcarrera@gmail.com> wrote:
> Wait... are you saying that a different F2008-compliant compiler may not
> support this feature? My understanding from the discussion here and at
> comp.lang.fortran was that this was a brand new feature added to F2008 and
> so it is entirely valid to use it.
>
> Cheers,
> Daniel.
>
> On 10/04/2011 01:47 PM, Paul Richard Thomas wrote:
>>
>> Dear Tobias,
>>
>> I know that it is an F2008 extension.  However, many of these are
>> unique to gfortran at present and so I think that Daniel would do well
>> to stick to not trying to pass internal procedures.
>>
>> I should perhaps have explained that.
>>
>> Cheers
>>
>> Paul
>>
>> On Mon, Oct 3, 2011 at 11:20 PM, Tobias Burnus<burnus@net-b.de>  wrote:
>>>
>>> Dear Daniel,
>>>
>>> Paul Richard Thomas wrote:
>>>>>
>>>>> Is it ok to ask "user" questions here? I'm back at school doing
>>>>> research.
>>>>> I
>>>>> have a piece of code that used to work and now refuses to compile. I'm
>>>>> using
>>>>> GFortran 4.4.3.
>>>
>>> ...
>>>>>
>>>>> Error: Internal procedure 'dp' is not allowed as an actual argument at
>>>>> (1)
>>>
>>> It might have worked with some gfortran compiler. Passing internal
>>> procedures is something which Fortran up to 2003 does not allow, but
>>> Fortran
>>> 2008 does. There are some gotchas which make the implementation
>>> nonstraight
>>> forward - though as GCC's middle end supports it, the Fortran front-end
>>> implementation was trivial.
>>>
>>> Since gfortran 4.6, it is officially supported by GCC (unless you use
>>> -std=f95/f2003). I think some old version of gfortran (4.1, 4.2, ...?)
>>> didn't diagnose it and, hence, also supported it.
>>>
>>> Tobias
>>>
>>
>>
>>
>
>
> --
> I'm not overweight, I'm undertall.
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy



More information about the Fortran mailing list