Support for GNU Fortran extensions

Are there plans to support any/all of the following GNU extensions:

  • backtrace
  • chmod
  • complex
  • fgetc
  • fputc
  • free
  • fseek
  • fstat
  • ftell
  • getcwd
  • getgid
  • getuid
  • gmtime
  • idate
  • int2
  • int8
  • itime
  • lstat
  • ltime
  • malloc
  • mclock
  • mclock8
  • rand
  • secnds
  • stat
  • time
  • unlink

I don’t see a reference to them here.

This is part of the effort to integrate the gfortran tests into llvm-test-suite (differential, discourse). I am trying to characterize some of the currently failing tests into “currently failing but eventually expected to work” and “will never be supported” categories. I don’t expect to be able to characterize all the failing tests (currently several hundred), but these seem to be reasonable for an initial attempt.

complex will not be supported; it’s a variant spelling of cmplx that no other Fortran compiler supports.

int2 and int8 are common extensions to many compilers and should be supported as intrinsic functions in f18, but are not yet, and I don’t plan to add them until somebody asks for them.

The rest could be made available in an extension intrinsic module for GNU Fortran porting assistance – they’d be mostly BIND(C) wrappers around libc routines – but there’s no plan to develop such a thing.

Hi @tarunprabhu, you can see the list intrinsics in this document:

Please add others if you find them. You will see the gfortran intrinsics in this list along with some status.

Ah, it never occurred to me look at the intrinsics sheet.

Based on your responses and the remarks in that sheet, I’ll classify the tests that exercise those intrinsics as “unsupported”, but I’ll add some flags (disabled by default) that will attempt to build them in case they are supported in the future.


There are also several DEC extensions in the gfortran test suite. Some of them are listed as (soon to be) supported in the extensions document. Are there plans to support any that are not listed there?