# GNU

**URL:** https://fortran-lang.discourse.group/c/compilers/gnu/26.md

[Latest](https://fortran-lang.discourse.group/latest.md) · [Categories](https://fortran-lang.discourse.group/categories.md)

---

## [About the GNU category](https://fortran-lang.discourse.group/t/about-the-gnu-category/6953)

<div class="topic-metadata">

**Author:** [@milancurcic](https://fortran-lang.discourse.group/u/milancurcic)\
**Replies:** 0

</div>

---

## [Gcc/gfortran 16 released](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870)

<div class="topic-metadata">

**Author:** [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Replies:** 58\
**Last updated:** [August 20, 2026, 10:10pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870 "2026-08-20T22:10:06Z")

</div>

FYI. Here are the changes listed on the gcc website Coarrays using native shared memory mulithreading on single node machines and handling Fortran 2018’s TEAM feature. Fortran 2003: Parameterized Derived Types support…

---

## [Do concurrent in \`gfortran\`](https://fortran-lang.discourse.group/t/do-concurrent-in-gfortran/10979)

<div class="topic-metadata">

**Author:** [@jorgeg](https://fortran-lang.discourse.group/u/jorgeg)\
**Replies:** 2\
**Last updated:** [June 25, 2026, 8:53pm UTC](https://fortran-lang.discourse.group/t/do-concurrent-in-gfortran/10979 "2026-06-25T20:53:04Z")

</div>

I am having trouble finding the documentation for the previous flag that was advertised for do concurrent with gfortran, the -ftree-parallelize-loops. I don’t see any docs about it for GNU 16. Has anyone tried this or r…

---

## [Wrong results with ASSOCIATE block](https://fortran-lang.discourse.group/t/wrong-results-with-associate-block/10886)

<div class="topic-metadata">

**Author:** [@Simo](https://fortran-lang.discourse.group/u/Simo)\
**Replies:** 7\
**Last updated:** [May 6, 2026, 11:13am UTC](https://fortran-lang.discourse.group/t/wrong-results-with-associate-block/10886 "2026-05-06T11:13:26Z")

</div>

Hi all, I ran into something strange with ASSOCIATE and the imaginary part selector %im. here is a small example: program hello use, intrinsic :: iso\_fortran\_env, only: wp =\> real64, compiler\_version implicit non…

---

## [String split in gfortran](https://fortran-lang.discourse.group/t/string-split-in-gfortran/10682)

<div class="topic-metadata">

**Author:** [@agisteg](https://fortran-lang.discourse.group/u/agisteg)\
**Replies:** 5\
**Last updated:** [February 7, 2026, 3:54am UTC](https://fortran-lang.discourse.group/t/string-split-in-gfortran/10682 "2026-02-07T03:54:22Z")

</div>

Is the new 2023 standard string split subroutine (16.9.196) not implemented in gfortran? I scanned the gcc source code and found that string\_split was defined in gcc/libgfortran/intrinsics/string\_intrinsics\_inc.c and gfo…

---

## [Gfortran -std=f2008 myfile.f08 gets Error: Fortran 2018:](https://fortran-lang.discourse.group/t/gfortran-std-f2008-myfile-f08-gets-error-fortran-2018/10586)

<div class="topic-metadata">

**Author:** [@gWyche](https://fortran-lang.discourse.group/u/gWyche)\
**Replies:** 1\
**Last updated:** [January 2, 2026, 2:47pm UTC](https://fortran-lang.discourse.group/t/gfortran-std-f2008-myfile-f08-gets-error-fortran-2018/10586 "2026-01-02T14:47:34Z")

</div>

The full line is: gfortran -J mod -I mod -std=f2008 -Wall -free-form -O -c -o OBJ/top.o top.f08 GNU Fortran (Debian 12.2.0-14) 12.2.0 How is it that -std=f2008 might be ignored so that 2018 gets mentioned at all? Bein…

---

## [Contiguous/strided pointer bounds issue](https://fortran-lang.discourse.group/t/contiguous-strided-pointer-bounds-issue/10389)

<div class="topic-metadata">

**Author:** [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Replies:** 13\
**Last updated:** [September 7, 2025, 9:41pm UTC](https://fortran-lang.discourse.group/t/contiguous-strided-pointer-bounds-issue/10389 "2025-09-07T21:41:11Z")

</div>

I am posting this here because I believe this test may be useful for other compilers as well, as I have tracked that down from a far larger code. Live testing is available here. It seems like pointer arrays cannot be u…

---

## [Can I force a trap for a denormal exception?](https://fortran-lang.discourse.group/t/can-i-force-a-trap-for-a-denormal-exception/10329)

<div class="topic-metadata">

**Author:** [@feenberg](https://fortran-lang.discourse.group/u/feenberg)\
**Replies:** 1\
**Last updated:** [August 14, 2025, 1:36am UTC](https://fortran-lang.discourse.group/t/can-i-force-a-trap-for-a-denormal-exception/10329 "2025-08-14T01:36:35Z")

</div>

I understand that the note generated for the IEEE\_DENORMAL exception is not an error message, however I would still like to learn where in my program that exception is happening. I don’t think anything in my program shou…

---

## [Gfortran-15 bug/regression](https://fortran-lang.discourse.group/t/gfortran-15-bug-regression/9943)

<div class="topic-metadata">

**Author:** [@gardhor](https://fortran-lang.discourse.group/u/gardhor)\
**Replies:** 14\
**Last updated:** [August 6, 2025, 11:30pm UTC](https://fortran-lang.discourse.group/t/gfortran-15-bug-regression/9943 "2025-08-06T23:30:40Z")

</div>

Dear all, Recently, I’ve updated the gfortran compiler to gfortran-15 on an ARM Mac laptop. Since then, I’ve encountered a strange error in a library that uses a function as an argument for another function. Type mis…

---

## [Derived data type component as do loop index](https://fortran-lang.discourse.group/t/derived-data-type-component-as-do-loop-index/9926)

<div class="topic-metadata">

**Author:** [@butterymarmite](https://fortran-lang.discourse.group/u/butterymarmite)\
**Replies:** 13\
**Last updated:** [July 30, 2025, 5:45am UTC](https://fortran-lang.discourse.group/t/derived-data-type-component-as-do-loop-index/9926 "2025-07-30T05:45:09Z")

</div>

(gfortran v13 on Linux) According to my 4th edition of Chapman: “Each component in a variable of a derived data type can be addressed independently, and can be used just like any other variable of the same type.” prog…

---

## [Non-associated procedure pointer as optional argument](https://fortran-lang.discourse.group/t/non-associated-procedure-pointer-as-optional-argument/9936)

<div class="topic-metadata">

**Author:** [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Replies:** 4\
**Last updated:** [July 18, 2025, 6:28am UTC](https://fortran-lang.discourse.group/t/non-associated-procedure-pointer-as-optional-argument/9936 "2025-07-18T06:28:06Z")

</div>

Hello Fortran community, I’ve stumbled upon an unexpected gfortran runtime error stop when using a non-associated procedure pointer as optional argument to a subroutine module m abstract interface ! Just a funct…

---

## [Fortran-lang page for gfortran refers to old versions](https://fortran-lang.discourse.group/t/fortran-lang-page-for-gfortran-refers-to-old-versions/9900)

<div class="topic-metadata">

**Author:** [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Replies:** 2\
**Last updated:** [July 3, 2025, 4:12am UTC](https://fortran-lang.discourse.group/t/fortran-lang-page-for-gfortran-refers-to-old-versions/9900 "2025-07-03T04:12:53Z")

</div>

I just noticed that the version numbers for the gfortran compiler on page “Installing GFortran — Fortran Programming Language” are lagging. The current version on equation.com at least is 15.1.0. I have not checked the o…

---

## [Timing of array initialisation](https://fortran-lang.discourse.group/t/timing-of-array-initialisation/9895)

<div class="topic-metadata">

**Author:** [@butterymarmite](https://fortran-lang.discourse.group/u/butterymarmite)\
**Replies:** 9\
**Last updated:** [July 1, 2025, 11:27pm UTC](https://fortran-lang.discourse.group/t/timing-of-array-initialisation/9895 "2025-07-01T23:27:41Z")

</div>

I’m new to Fortran - using gfortran on Linux Initialising an array using a do loop compiles some 8-10 times faster than an iteration; can someone explain why? thanks integer, dimension(1002001) :: buildarray integer …

---

## [GNU Fortran 15.1 has been released](https://fortran-lang.discourse.group/t/gnu-fortran-15-1-has-been-released/9630)

<div class="topic-metadata">

**Author:** [@interkosmos](https://fortran-lang.discourse.group/u/interkosmos)\
**Replies:** 14\
**Last updated:** [May 26, 2025, 5:27pm UTC](https://fortran-lang.discourse.group/t/gnu-fortran-15-1-has-been-released/9630 "2025-05-26T17:27:14Z")

</div>

Greetings, the GCC developers announced the release of GCC 15.1. The change log mentions the following updates to GNU Fortran: Fortran 2018 and 2023 locality specifiers to do concurrent are now supported. Experimental…

---

## [Help working around finalization issue](https://fortran-lang.discourse.group/t/help-working-around-finalization-issue/9690)

<div class="topic-metadata">

**Author:** [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Replies:** 9\
**Last updated:** [May 13, 2025, 3:14pm UTC](https://fortran-lang.discourse.group/t/help-working-around-finalization-issue/9690 "2025-05-13T15:14:56Z")

</div>

I posted an example of an issue with the gfortran finalizer I’ve been scratching my head on: This example has a derived type containing a hashmap: type :: derived type(hash) :: map end type likely due to finalizati…

---

## [Defined assignment for polymorphic variable and vector subscript](https://fortran-lang.discourse.group/t/defined-assignment-for-polymorphic-variable-and-vector-subscript/9666)

<div class="topic-metadata">

**Author:** [@kamelstekspizza](https://fortran-lang.discourse.group/u/kamelstekspizza)\
**Replies:** 0\
**Last updated:** [May 5, 2025, 4:25pm UTC](https://fortran-lang.discourse.group/t/defined-assignment-for-polymorphic-variable-and-vector-subscript/9666 "2025-05-05T16:25:29Z")

</div>

I was playing around with polymorphism and defined assignment when I encountered a problem with gfortran when trying to assign to a polymorphic variable using a vector subscript. Here is an example of what I mean modul…

---

## [Problem with impure elemental subroutine in interface with gfortran](https://fortran-lang.discourse.group/t/problem-with-impure-elemental-subroutine-in-interface-with-gfortran/9545)

<div class="topic-metadata">

**Author:** [@Beliavsky](https://fortran-lang.discourse.group/u/Beliavsky)\
**Replies:** 5\
**Last updated:** [April 7, 2025, 11:19am UTC](https://fortran-lang.discourse.group/t/problem-with-impure-elemental-subroutine-in-interface-with-gfortran/9545 "2025-04-07T11:19:12Z")

</div>

Compiling and running the code below, also at Compiler Explorer, module m1\_mod implicit none interface foo module procedure foo\_mat end interface foo contains subroutine foo\_mat(x, nacf, label) real, intent(in) :: x…

---

## [Gfortran ignores error in dummy array specification](https://fortran-lang.discourse.group/t/gfortran-ignores-error-in-dummy-array-specification/9192)

<div class="topic-metadata">

**Author:** [@msz59](https://fortran-lang.discourse.group/u/msz59)\
**Replies:** 5\
**Last updated:** [February 10, 2025, 8:11pm UTC](https://fortran-lang.discourse.group/t/gfortran-ignores-error-in-dummy-array-specification/9192 "2025-02-10T20:11:22Z")

</div>

Consider the following excerpt from a student code :slight\_smile: program pot implicit none real, allocatable :: tab(:,:) integer :: m read(\*,\*) m allocate(tab(m,m)) call sub(tab) contains subroutine su…

---

## [Upgrading gfortran on Ubuntu22 LTS](https://fortran-lang.discourse.group/t/upgrading-gfortran-on-ubuntu22-lts/9154)

<div class="topic-metadata">

**Author:** [@septc](https://fortran-lang.discourse.group/u/septc)\
**Replies:** 10\
**Last updated:** [February 11, 2025, 3:02am UTC](https://fortran-lang.discourse.group/t/upgrading-gfortran-on-ubuntu22-lts/9154 "2025-02-11T03:02:58Z")

</div>

Hello, I am using Ubuntu22 LTS on my PC and gfortran-11 for all my calculations. This version works very nicely for me, but I would also like to try newer versions (hopefully without compiling from source!) Looking at r…

---

## [\`target\` attribute seemingly affecting performances](https://fortran-lang.discourse.group/t/target-attribute-seemingly-affecting-performances/9137)

<div class="topic-metadata">

**Author:** [@mEm](https://fortran-lang.discourse.group/u/mEm)\
**Replies:** 26\
**Last updated:** [January 29, 2025, 10:50pm UTC](https://fortran-lang.discourse.group/t/target-attribute-seemingly-affecting-performances/9137 "2025-01-29T22:50:44Z")

</div>

While working on the complete refactoring of a Modern Fortran code, I probably stumbled, very casually but fortunately, onto a very bizarre finding from my POV. So, previously withing a very computationally intense proc…

---

## [Critical Issue: CLT16 Linker Fails to Initialize BLOCK DATA](https://fortran-lang.discourse.group/t/critical-issue-clt16-linker-fails-to-initialize-block-data/8931)

<div class="topic-metadata">

**Author:** [@luillo](https://fortran-lang.discourse.group/u/luillo)\
**Replies:** 4\
**Last updated:** [December 5, 2024, 6:30pm UTC](https://fortran-lang.discourse.group/t/critical-issue-clt16-linker-fails-to-initialize-block-data/8931 "2024-12-05T18:30:30Z")

</div>

Hello, We’ve encountered a critical issue with the new linker in Xcode 15’s CLT16 (version 16.1.0.0.1.1729049160) that prevents the proper initialization of BLOCK DATA . I’m using GNU gfortran installed via MacPorts g…

---

## [PRINT deferred variable in FUNCTION](https://fortran-lang.discourse.group/t/print-deferred-variable-in-function/8747)

<div class="topic-metadata">

**Author:** [@gWyche](https://fortran-lang.discourse.group/u/gWyche)\
**Replies:** 13\
**Last updated:** [November 13, 2024, 12:44am UTC](https://fortran-lang.discourse.group/t/print-deferred-variable-in-function/8747 "2024-11-13T00:44:47Z")

</div>

! These lines constitute file gag.f90 ! gfortran gag.f90 ! ./a.out ! HANG! MODULE no\_can\_do\_mod IMPLICIT NONE CONTAINS FUNCTION no\_can\_do () RESULT (sResult) CHARACTER(:), ALLOCATABLE :: sResult sResult = ‘Ei’ …

---

## [Type, allocation of, and assignment to deferred-length character arrays](https://fortran-lang.discourse.group/t/type-allocation-of-and-assignment-to-deferred-length-character-arrays/8758)

<div class="topic-metadata">

**Author:** [@KazuFurutaka](https://fortran-lang.discourse.group/u/KazuFurutaka)\
**Replies:** 3\
**Last updated:** [October 28, 2024, 11:14pm UTC](https://fortran-lang.discourse.group/t/type-allocation-of-and-assignment-to-deferred-length-character-arrays/8758 "2024-10-28T23:14:08Z")

</div>

Dear all, I’m trying to use a modified version of an old fortran program (I believe at first it was written in fortran 77 or older), on linux (Fedora 40, x86\_64). The program works fine when compiled using Intel ifx/if…

---

## [Do concurrent "reduce" in GCC](https://fortran-lang.discourse.group/t/do-concurrent-reduce-in-gcc/8723)

<div class="topic-metadata">

**Author:** [@sumseq](https://fortran-lang.discourse.group/u/sumseq)\
**Replies:** 1\
**Last updated:** [October 15, 2024, 7:40pm UTC](https://fortran-lang.discourse.group/t/do-concurrent-reduce-in-gcc/8723 "2024-10-15T19:40:22Z")

</div>

Does anyone know if anyone is working on a GCC implementation of the Fortran 2023 do concurrent reduce() clause? I am not even referring to implementing it in parallel - just to have the compiler recognize it and not th…

---

## [Gfortran on mac m2 silicon - PATH problem with Hello World](https://fortran-lang.discourse.group/t/gfortran-on-mac-m2-silicon-path-problem-with-hello-world/8681)

<div class="topic-metadata">

**Author:** [@DownSideUp](https://fortran-lang.discourse.group/u/DownSideUp)\
**Replies:** 3\
**Last updated:** [October 4, 2024, 8:48am UTC](https://fortran-lang.discourse.group/t/gfortran-on-mac-m2-silicon-path-problem-with-hello-world/8681 "2024-10-04T08:48:34Z")

</div>

Wondering if I should modify my PATH . I have a hello.90 file on my desktop. ( Not sure if it’s supposed to be there, or some dedicated folder ). I have installed Homebrew, and the required Xcode updates via homebrew. Th…

---

## [gFortran error "Unexpected pointer assignment"](https://fortran-lang.discourse.group/t/gfortran-error-unexpected-pointer-assignment/8640)

<div class="topic-metadata">

**Author:** [@gWyche](https://fortran-lang.discourse.group/u/gWyche)\
**Replies:** 1\
**Last updated:** [September 22, 2024, 8:44pm UTC](https://fortran-lang.discourse.group/t/gfortran-error-unexpected-pointer-assignment/8640 "2024-09-22T20:44:11Z")

</div>

Unexpected pointer assignment statement in … If you get this and the erring file is a MODULE, then you may forgot to have the assignments below in the CONTAINS section. What you are assigning to must be a TARGET. Furt…

---

## [Understanding gfortran error](https://fortran-lang.discourse.group/t/understanding-gfortran-error/8146)

<div class="topic-metadata">

**Author:** [@dukeleto](https://fortran-lang.discourse.group/u/dukeleto)\
**Replies:** 7\
**Last updated:** [September 19, 2024, 9:16am UTC](https://fortran-lang.discourse.group/t/understanding-gfortran-error/8146 "2024-09-19T09:16:02Z")

</div>

I am trying to get a (stupidly) big code to compile with GNU, and am hitting an error about a misplaced bracket at line 26000 of a file containing a thousand lines. The exact error is pasted below : f951: Fatal Error: …

---

## [Automatic array of derived type with allocatable component](https://fortran-lang.discourse.group/t/automatic-array-of-derived-type-with-allocatable-component/8470)

<div class="topic-metadata">

**Author:** [@kamelstekspizza](https://fortran-lang.discourse.group/u/kamelstekspizza)\
**Replies:** 2\
**Last updated:** [August 15, 2024, 9:28am UTC](https://fortran-lang.discourse.group/t/automatic-array-of-derived-type-with-allocatable-component/8470 "2024-08-15T09:28:35Z")

</div>

Hello, this is my first post here, so I hope this is the right section for this topic and that the formatting is ok. I am having a bit of trouble understanding the behavior of the following code when it is compiled with…

---

## [Losing integer array values](https://fortran-lang.discourse.group/t/losing-integer-array-values/8463)

<div class="topic-metadata">

**Author:** [@Ragnarthecoder](https://fortran-lang.discourse.group/u/Ragnarthecoder)\
**Replies:** 6\
**Last updated:** [August 12, 2024, 2:24am UTC](https://fortran-lang.discourse.group/t/losing-integer-array-values/8463 "2024-08-12T02:24:21Z")

</div>

I written the following code to find an array of values then to search those values for matches to a set of conditions. The code appears to run without errors but for some reason I am losing the values to several of the …

---

## [Integer or real to character string: bug with gfortran with OpenMP?](https://fortran-lang.discourse.group/t/integer-or-real-to-character-string-bug-with-gfortran-with-openmp/8408)

<div class="topic-metadata">

**Author:** [@gardhor](https://fortran-lang.discourse.group/u/gardhor)\
**Replies:** 7\
**Last updated:** [July 30, 2024, 6:10am UTC](https://fortran-lang.discourse.group/t/integer-or-real-to-character-string-bug-with-gfortran-with-openmp/8408 "2024-07-30T06:10:50Z")

</div>

This post is related this “Equivalent of str function (from python) in Fortran”, but I prefer to open a new post. For a large code, I want to use a function equivalent to « TO\_string » to convert an integer or a real to…

[Next page](https://fortran-lang.discourse.group/c/compilers/gnu/26.md?page=1)
