summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/save_result.f90
blob: de70cc38f4cd727f051630d6fbe31c27a8bf397a (plain)
1
2
3
4
5
6
7
8
! { dg-do compile }
! PR20856 - A function result may not have SAVE attribute.
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
FUNCTION X() RESULT(Y)
REAL, SAVE :: Y ! { dg-error "RESULT attribute conflicts with SAVE" }
y = 1
END FUNCTION X
END