diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/c_by_val_4.f')
-rw-r--r-- | gcc/testsuite/gfortran.dg/c_by_val_4.f | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/c_by_val_4.f b/gcc/testsuite/gfortran.dg/c_by_val_4.f new file mode 100644 index 000000000..c8f4b0484 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c_by_val_4.f @@ -0,0 +1,17 @@ +C { dg-do compile } +C Tests the fix for PR30888, in which the dummy procedure would +C generate an error with the %VAL argument, even though it is +C declared EXTERNAL. +C +C Contributed by Peter W. Draper <p.w.draper@durham.ac.uk> +C + SUBROUTINE VALTEST( DOIT ) + EXTERNAL DOIT + INTEGER P + INTEGER I + I = 0 + P = 0 + CALL DOIT( %VAL( P ) ) ! { dg-warning "Extension: argument list function" } + CALL DOIT( I ) + CALL DOIT( %VAL( P ) ) ! { dg-warning "Extension: argument list function" } + END |