# Gcc/gfortran 16 released

**URL:** <https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870>\
**Category:** GNU\
**Created:** [April 23, 2026, 6:21pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870 "2026-04-23T18:21:51Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [April 30, 2026, 4:00pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/21 "2026-04-30T16:00:16Z")

</div>

GCC 16.1 was officially released today:

> **[GCC 16 Release Series
- GNU Project](https://gcc.gnu.org/gcc-16/)**

> **[GCC 16.1 Released With AMD Zen 6 Support, Algol 68 & Many C++ Improvements](https://www.phoronix.com/news/GCC-16.1-Released)**
>
> GCC 16.1 is now available as the first stable release of GCC 16 as this year's major open-source GNU compiler feature release.

---

<div class="post-metadata">

**Author:** ![jorgeg](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jorgeg/32/6835_2.png) [@jorgeg](https://fortran-lang.discourse.group/u/jorgeg)\
**Post date:** [May 2, 2026, 6:40am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/22 "2026-05-02T06:40:05Z")

</div>

does anyone have a `./configure` line that has worked? I am not being able to compile `gcc`

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 2, 2026, 10:31am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/23 "2026-05-02T10:31:54Z")

</div>

> [@jorgeg](#):
>
> does anyone have a `./configure` line that has worked?

Jerry guided me to compile GCC a few weeks ago.

I had created a `gcc-dev` directory with three subdirs:

- `trunk/` (gcc sources)
- `objdir/` (empty)
- `usr/` (empty)

First, in `trunk/`:

```bash
$ ./contrib/download_prerequisites
$ sudo dnf install gcc-c++ glibc-devel.i686

```

From `objdir/`, I had in my script:

```bash
readonly repertoire=/home/my_login/gcc_dev
../trunk/configure --prefix="${repertoire}"/usr --enable-languages=c,c++,fortran --enable-multilib --enable-libgomp --disable-bootstrap

make -j10 1>/dev/null && make install 1>/dev/null

```

Drink you coffee… ☕

Finally I tested my snippets with:

```bash
gcc_dev/my_snippets$ LD_LIBRARY_PATH=/home/my_login/gcc_dev/usr/lib:/home/my_login/gcc_dev/usr/lib64
gcc_dev/my_snippets$ export LD_LIBRARY_PATH
gcc_dev/my_snippets$ ../usr/bin/gfortran -fcoarray=lib collective.f90 -lcaf_shmem

```

I should update the Fortran Wiki page with those info.

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 3, 2026, 9:37am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/24 "2026-05-03T09:37:51Z")

</div>

For adventurers only, GFortran 16.1 has arrived in Fedora Rawhide (development distribution):

> **[gcc-gfortran - Fedora Packages](https://packages.fedoraproject.org/pkgs/gcc/gcc-gfortran/)**
>
> View gcc-gfortran in the Fedora package repositories. gcc-gfortran: Fortran support

Next steps should be Fedora 44 Testing, then Stable.

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 5, 2026, 7:40am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/25 "2026-05-05T07:40:24Z")

</div>

It has just arrived in Fedora Linux 44:

```bash
$ gfortran --version
GNU Fortran (GCC) 16.1.1 20260501 (Red Hat 16.1.1-1)
Copyright © 2026 Free Software Foundation, Inc.

```

---

<div class="post-metadata">

**Author:** ![RonShepard](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@RonShepard](https://fortran-lang.discourse.group/u/RonShepard)\
**Post date:** [May 5, 2026, 3:58pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/26 "2026-05-05T15:58:30Z")

</div>

Does gfortran 16 have an entirely new front-end? What kinds of problems should we watch for with new front end code?

---

<div class="post-metadata">

**Author:** ![wspector](https://avatars.discourse-cdn.com/v4/letter/w/47e85d/32.png) [@wspector](https://fortran-lang.discourse.group/u/wspector)\
**Post date:** [May 5, 2026, 5:35pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/27 "2026-05-05T17:35:00Z")

</div>

The gfortran front end is an evolution of what has existed for many years. So you shouldn’t have to change anything. (Modulo bug fixes. One I know about is that Jerry D and I worked to get certain `INQUIRE` return values corrected.) The new front ends over the past couple of major releases are Algol 68 and COBOL.

---

<div class="post-metadata">

**Author:** ![weixing1531](https://avatars.discourse-cdn.com/v4/letter/w/a88e57/32.png) [@weixing1531](https://fortran-lang.discourse.group/u/weixing1531)\
**Post date:** [May 6, 2026, 3:02am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/28 "2026-05-06T03:02:52Z")

</div>

[DO CONCURRENT](https://fortran-lang.discourse.group/t/do-concurrent-compiler-flags-to-enable-parallelization/4300/9) can speedup like openMP in gfortran 16.1?

---

<div class="post-metadata">

**Author:** ![jorgeg](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jorgeg/32/6835_2.png) [@jorgeg](https://fortran-lang.discourse.group/u/jorgeg)\
**Post date:** [May 6, 2026, 4:11am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/29 "2026-05-06T04:11:45Z")

</div>

I’ve had little success with GNU accelerating do concurrent, if you have good experiences please do tell

---

<div class="post-metadata">

**Author:** ![jorgeg](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jorgeg/32/6835_2.png) [@jorgeg](https://fortran-lang.discourse.group/u/jorgeg)\
**Post date:** [May 7, 2026, 7:18am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/30 "2026-05-07T07:18:04Z")

</div>

the solution was to do an out of source build…

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 7, 2026, 7:56am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/31 "2026-05-07T07:56:08Z")

</div>

Indeed @jorgeg , that’s an advice that Jerry gave me, after my first attempts.

---

<div class="post-metadata">

**Author:** ![jorgeg](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jorgeg/32/6835_2.png) [@jorgeg](https://fortran-lang.discourse.group/u/jorgeg)\
**Post date:** [May 7, 2026, 9:51am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/32 "2026-05-07T09:51:08Z")

</div>

Jerry is smart! thanks so much

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 8, 2026, 8:30am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/33 "2026-05-08T08:30:02Z")

</div>

> [@jorgeg](#):
>
> Jerry is smart!

That is definitely a prerequisite to be a GFortran developer 😁 . I guess he compiles GCC every day, so you can trust him.

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 8, 2026, 8:31am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/34 "2026-05-08T08:31:25Z")

</div>

Another news about GCC (17 ?):

> **[New GCC Back-End Proposed For WebAssembly](https://www.phoronix.com/news/GCC-WASM-WebAssembly)**
>
> When it comes to compiling C/C++ code to WebAssembly (WASM), LLVM/Clang and other LLVM-based tooling has dominated the space

I don’t know if Fortran will be concerned, but if it is a back-end… LFortran has already a WebAssembly back-end.

---

<div class="post-metadata">

**Author:** ![cmaapic](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/cmaapic/32/659_2.png) [@cmaapic](https://fortran-lang.discourse.group/u/cmaapic)\
**Post date:** [May 11, 2026, 11:36am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/35 "2026-05-11T11:36:26Z")

</div>

I did some comparative bench marking of gfortran and Intel ifx.  
Here is the source code of the main program.

```fortran
! include ‘precision_module.f90’
! include ‘integer_kind_module.f90’
! Included in the timing_module

include ‘timing_module.f90’

program ch3403

use precision_module
use timing_module

implicit none

real (dp) :: fortran_internal_pi
real (dp) :: partial_pi
real (dp) :: coarray_pi
real (dp) :: width
real (dp) :: total_sum
real (dp) :: x
real (dp), codimension [*] :: partial_sum

integer :: n_intervals
integer :: i
integer :: j
integer :: current_image
integer :: n_images

fortran_internal_pi = 4.0_dp*atan(1.0_dp)
n_images = num_images()
current_image = this_image()

if (current_image==1) then
print *, ’ Number of images = ', n_images
call start_timing()
end if

n_intervals = 100000

do j = 1, 5
width = 1.0_dp/real(n_intervals, dp)
total_sum = 0.0_dp
partial_sum = 0.0_dp
do i = current_image, n_intervals, n_images
x = (real(i,dp)-0.5_dp)width
partial_sum = partial_sum + f(x)
end do
partial_sum = partial_sumwidth
sync all
if (current_image==1) then
do i = 1, n_images
total_sum = total_sum + partial_sum[i]
end do
coarray_pi = total_sum
print 100, n_intervals, time_difference()
print 110, coarray_pi, abs(coarray_pi-fortran_internal_pi)
end if
n_intervals = n_intervals*10
sync all
end do

if (current_image==1) then
call end_timing()
end if

100 format (’ n intervals = ‘, i12, ’ time =’, f18.6)
110 format (’ pi = ', f20.16, /, ’ difference = ', f20.16)

contains

real (dp) function f(x)
implicit none
real (dp), intent (in) :: x

f = 4.0_dp/(1.0_dp+x*x)

end function

end program

```

Here are the timing details.

| | | Intervals | Average of 10 runs |
| --- | --- | --- | --- |
| | | | |
| gfortran | | 100,000 | 0.000408 |
| gfortran | | 1,000,000 | 0.000907 |
| gfortran | | 10,000,000 | 0.001538 |
| gfortran | | 100,000,000 | 0.009646 |
| gfortran | | 1,000,000,000 | 0.098619 |
| | | | |
| gfortran | | Total | 0.111455 |
| | | | |
| Intel ifx | | 100,000 | 0.000275 |
| Intel ifx | | 1,000,000 | 0.000289 |
| Intel ifx | | 10,000,000 | 0.001027 |
| Intel ifx | | 100,000,000 | 0.007884 |
| Intel ifx | | 1,000,000,000 | 0.108436 |
| | | | |
| Intel ifx | | Total | 0.118361 |
| | | | |
| gfortran | | 16.1.1 20260501 | |
| ifx | | 2026.0.0 | |
| | | | |
| Fedora | | Fedora Linux 44 | Workstation edition |
| | | Redhat | 16.1.1-1 |
| | | | |
| Processor | Intel I9 | 10980XE | |
| hyper-v | | | |
| memory | | 32 GB | |
| cores | | 16 | |

The source files are on our web sites.

> **[Fortranplus - 4th edition \*new\* examples](https://www.fortranplus.co.uk/fortranplus-books/4th-edition-new-examples/)**
>
> New page

> **[Index of /fortran/fourth\_edition\_update](https://www.rhymneyconsulting.co.uk/fortran/fourth_edition_update/)**

There is a tar file of all the source files.

---

<div class="post-metadata">

**Author:** ![rwmsu](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Post date:** [May 21, 2026, 8:53pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/36 "2026-05-21T20:53:58Z")

</div>

GCC 16 has appeared in the Ubuntu repositories. I installed it on my Linux Mint 21.3 (Ubuntu 22.04 LTS Jammy) system with sudo apt install

---

<div class="post-metadata">

**Author:** ![RonShepard](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@RonShepard](https://fortran-lang.discourse.group/u/RonShepard)\
**Post date:** [May 21, 2026, 10:57pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/37 "2026-05-21T22:57:37Z")

</div>

What is the status of coarray support in gfortran 16? I’m curious about both threads-based and image-based capabilities, and possibly the combination of the two. Is there a gfortran link that has this information?

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 22, 2026, 8:37am UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/38 "2026-05-22T08:37:52Z")

</div>

> [@RonShepard](#):
>
> Is there a gfortran link that has this information?

The page [https://gcc.gnu.org/wiki/Coarray](https://gcc.gnu.org/wiki/Coarray) is totally outdated (2016).

---

<div class="post-metadata">

**Author:** ![msz59](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@msz59](https://fortran-lang.discourse.group/u/msz59)\
**Post date:** [May 22, 2026, 10:10pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/39 "2026-05-22T22:10:49Z")

</div>

I am no expert on CAF, so I asked ChatGPT to construct a test program for as many Coarrays features as it can. The output is below, so you can check its completeness yourself.

Gfortran 16.1 on Fedora 44 VM (6 CPUs) passes all tests. Interestingly, ‘ifx’ 2025.3.2 segfaults on test\_sync\_images\_memory() procedure. I have yet to check the newest, 2026 version.

> **Coarray test program (created by ChatGPT 5.5)**
>
> ```fortran
> module reducers
> contains
> pure function add_int(a, b) result(c)
> integer, intent(in) :: a, b
> integer :: c
> c = a + b
> end function add_int
> end module reducers
> 
> program caf_feature_test
> use reducers
> use iso_fortran_env, only : atomic_int_kind, event_type, lock_type, team_type
> implicit none
> 
> integer :: me, nimg, i
> integer :: scalar[*]
> integer, allocatable :: arr(:)[:]
> integer(atomic_int_kind) :: acount[*]
> type(lock_type) :: lk[*]
> type(event_type) :: ev[*]
> type(team_type) :: even_odd_team
> integer :: team_no
> 
> me = this_image()
> nimg = num_images()
> 
> if (me == 1) then
> print *, "========================================"
> print *, "Coarray Fortran feature test"
> print *, "num_images() =", nimg
> print *, "========================================"
> end if
> sync all
> 
> call test_images_and_coindexed_access()
> call test_allocatable_coarray()
> call test_sync_images()
> call test_sync_images_memory()
> call test_atomic()
> call test_lock()
> call test_events()
> call test_collectives()
> call test_teams()
> 
> sync all
> if (me == 1) print *, "All tests finished."
> 
> contains
> 
> subroutine say(name)
> character(*), intent(in) :: name
> sync all
> if (me == 1) then
> print *
> print *, "---- ", trim(name), " ----"
> end if
> sync all
> end subroutine say
> 
> subroutine test_images_and_coindexed_access()
> call say("images and coindexed access")
> 
> scalar = 1000 + me
> sync all
> 
> if (me == 1) then
> do i = 1, nimg
> print *, "scalar on image", i, "=", scalar[i]
> end do
> end if
> 
> sync all
> end subroutine test_images_and_coindexed_access
> 
> subroutine test_allocatable_coarray()
> call say("allocatable coarray")
> 
> allocate(arr(3)[*])
> arr = [me, 10*me, 100*me]
> sync all
> 
> if (me == 1) then
> do i = 1, nimg
> print *, "arr(:, image", i, ") =", arr(:)[i]
> end do
> end if
> 
> sync all
> deallocate(arr)
> end subroutine test_allocatable_coarray
> 
> subroutine test_sync_images()
> integer :: left, right
> 
> call say("sync images / remote write")
> 
> left = merge(me - 1, nimg, me > 1)
> right = merge(me + 1, 1, me < nimg)
> 
> scalar = -1
> sync all
> 
> scalar[right] = me
> 
> sync all
> 
> print *, "image", me, "received scalar =", scalar, &
> "from left neighbour", left
> 
> sync all
> end subroutine test_sync_images
> 
> subroutine test_sync_images_memory()
> integer :: left, right
> integer, allocatable :: partners(:)
> 
> call say("sync images and sync memory")
> 
> left = merge(me - 1, nimg, me > 1)
> right = merge(me + 1, 1, me < nimg)
> 
> scalar = -1
> sync all
> 
> ! Each image writes to its right neighbour.
> scalar[right] = me
> 
> ! Ensure remote write is completed before synchronization.
> sync memory
> 
> ! Synchronize with both neighbours, so synchronization is matched.
> if (nimg == 1) then
> sync all
> else if (nimg == 2) then
> sync images(left)
> else
> partners = [left, right]
> sync images(partners)
> end if
> 
> print *, "image", me, "received scalar =", scalar, &
> "from left neighbour", left
> 
> sync all
> end subroutine test_sync_images_memory
>  
> subroutine test_atomic()
> integer(atomic_int_kind) :: old
> 
> call say("atomic add / atomic ref")
> 
> acount = 0_atomic_int_kind
> sync all
> 
> call atomic_add(acount[1], 1_atomic_int_kind)
> 
> sync all
> if (me == 1) then
> call atomic_ref(old, acount)
> print *, "atomic counter on image 1 =", old, "expected", nimg
> end if
> 
> sync all
> end subroutine test_atomic
> 
> subroutine test_lock()
> integer :: old
> 
> call say("locks")
> 
> scalar = 0
> sync all
> 
> lock(lk[1])
> old = scalar[1]
> scalar[1] = old + 1
> unlock(lk[1])
> 
> sync all
> if (me == 1) then
> print *, "locked counter =", scalar, "expected", nimg
> end if
> 
> sync all
> end subroutine test_lock
> 
> subroutine test_events()
> integer :: src
> 
> call say("events")
> 
> if (nimg < 2) then
> if (me == 1) print *, "Skipping event test: need at least 2 images."
> sync all
> return
> end if
> 
> if (me == 1) then
> scalar = 12345
> event post(ev[2])
> else if (me == 2) then
> event wait(ev)
> src = scalar[1]
> print *, "image 2 received event; scalar[1] =", src
> end if
> 
> sync all
> end subroutine test_events
> 
> subroutine test_collectives()
> integer :: x, y
> integer :: result
> character(len=40) :: msg
> 
> call say("collective subroutines")
> 
> x = me
> 
> y = x
> call co_sum(y)
> if (me == 1) print *, "co_sum(image index) =", y, "expected", nimg*(nimg+1)/2
> 
> y = x
> call co_max(y)
> if (me == 1) print *, "co_max(image index) =", y, "expected", nimg
> 
> y = x
> call co_min(y)
> if (me == 1) print *, "co_min(image index) =", y, "expected", 1
> 
> msg = ""
> if (me == 1) msg = "hello from image 1"
> call co_broadcast(msg, source_image=1)
> print *, "image", me, "after co_broadcast:", trim(msg)
> 
> result = me
> call co_reduce(result, add_int)
> if (me == 1) print *, "co_reduce(add_int) =", result
> 
> sync all
> end subroutine test_collectives
> 
> subroutine test_teams()
> integer :: local_sum
> 
> call say("teams and change team")
> 
> if (nimg < 2) then
> if (me == 1) print *, "Skipping team test: need at least 2 images."
> sync all
> return
> end if
> 
> ! Team 1: odd original images.
> ! Team 2: even original images.
> team_no = merge(1, 2, mod(me,2) == 1)
> 
> form team(team_no, even_odd_team)
> 
> change team(even_odd_team)
> local_sum = this_image()
> call co_sum(local_sum)
> 
> if (this_image() == 1) then
> print *, "original image", me, &
> "is leader of team", team_number(), &
> "with num_images() =", num_images(), &
> "and local co_sum =", local_sum
> end if
> 
> sync all
> end team
> 
> sync all
> end subroutine test_teams
> 
> end program caf_feature_test
> 
> ```

---

<div class="post-metadata">

**Author:** ![Harper](https://avatars.discourse-cdn.com/v4/letter/h/b5ac83/32.png) [@Harper](https://fortran-lang.discourse.group/u/Harper)\
**Post date:** [May 24, 2026, 9:24pm UTC](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870/40 "2026-05-24T21:24:07Z")

</div>

When will gfortran 16 be available to Ubuntu systems? My sad little dialogue with it this morning is

```auto
sudo apt install gfortran
[sudo] password for john: 
gfortran is already the newest version (4:15.2.0-4ubuntu1).
Summary:                    
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 1495

```

[Previous page](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870.md?page=1)

[Next page](https://fortran-lang.discourse.group/t/gcc-gfortran-16-released/10870.md?page=3)
