gnu.org/gcc add fortran (#1637)

* Add fortran to enabled languages; add test.f90 test file

* Add test.f90

---------

Co-authored-by: James Reynolds <magnsuviri@me.com>
This commit is contained in:
James Reynolds 2023-04-22 15:08:02 -06:00 committed by GitHub
parent eed3d1b401
commit 7c9df6b99b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -60,7 +60,7 @@ build:
ARGS: ARGS:
- --prefix={{ prefix }} - --prefix={{ prefix }}
- --libdir={{ prefix }}/lib - --libdir={{ prefix }}/lib
- --enable-languages=c,c++,objc,obj-c++ - --enable-languages=c,c++,objc,obj-c++,fortran
- --with-bugurl="https://github.com/teaxyz/pantry/issues" - --with-bugurl="https://github.com/teaxyz/pantry/issues"
- --disable-bootstrap - --disable-bootstrap
- --disable-nls - --disable-nls
@ -90,6 +90,9 @@ test: |
./test1 ./test1
g++ -o test2 test.cc g++ -o test2 test.cc
test "$(./test2)" = "Hello, world!" test "$(./test2)" = "Hello, world!"
gfortran -o test3 test.f90
test "$(./test3)" = "Hello, world!"
provides: provides:
- bin/gc++ # we provide c++ in tea.xyz/gx/cc - bin/gc++ # we provide c++ in tea.xyz/gx/cc
@ -102,4 +105,5 @@ provides:
- bin/gcov - bin/gcov
- bin/gcov-dump - bin/gcov-dump
- bin/gcov-tool - bin/gcov-tool
- bin/gfortran
- bin/lto-dump - bin/lto-dump

View file

@ -0,0 +1,8 @@
integer,parameter::m=10000
real::a(m), b(m)
real::fact=0.5
do concurrent (i=1:m)
a(i) = a(i) + fact*b(i)
end do
write(*,"(A)") "Hello, world!"
end