gfortran.exp (gfortran_target_compile): Call dg-additional-files-options
2005-06-05 David Billinghurst <David.Billinghurst@riotinto.com> * lib/gfortran.exp (gfortran_target_compile): Call dg-additional-files-options * gfortran.dg/f2c_4.f90: New file * gfortran.dg/f2c_4.c: New file * gfortran.dg/f2c_5.f90: New file * gfortran.dg/f2c_5.c: New file From-SVN: r100641
This commit is contained in:
parent
9d997b96c2
commit
f25284f378
9
gcc/testsuite/gfortran.dg/f2c_4.c
Executable file
9
gcc/testsuite/gfortran.dg/f2c_4.c
Executable file
@ -0,0 +1,9 @@
|
||||
extern double f2c_4b__(double *);
|
||||
extern void abort (void);
|
||||
|
||||
void f2c_4a__(void) {
|
||||
double a,b;
|
||||
a = 1023.0;
|
||||
b=f2c_4b__(&a);
|
||||
if ( a != b ) abort();
|
||||
}
|
14
gcc/testsuite/gfortran.dg/f2c_4.f90
Executable file
14
gcc/testsuite/gfortran.dg/f2c_4.f90
Executable file
@ -0,0 +1,14 @@
|
||||
! { dg-do run }
|
||||
! { dg-additional-sources f2c_4.c }
|
||||
! { dg-options "-ff2c -w" }
|
||||
|
||||
! Check -ff2c calling conventions
|
||||
! Return value of REAL function is promoted to C type double
|
||||
! Addional underscore appended to function name
|
||||
call f2c_4a()
|
||||
end
|
||||
|
||||
real function f2c_4b(x)
|
||||
double precision x
|
||||
f2c_4b = x
|
||||
end
|
9
gcc/testsuite/gfortran.dg/f2c_5.c
Executable file
9
gcc/testsuite/gfortran.dg/f2c_5.c
Executable file
@ -0,0 +1,9 @@
|
||||
extern float f2c_5b_(double *);
|
||||
extern void abort (void);
|
||||
|
||||
void f2c_5a_(void) {
|
||||
double a,b;
|
||||
a = 1023.0;
|
||||
b=f2c_5b_(&a);
|
||||
if ( a != b ) abort();
|
||||
}
|
12
gcc/testsuite/gfortran.dg/f2c_5.f90
Executable file
12
gcc/testsuite/gfortran.dg/f2c_5.f90
Executable file
@ -0,0 +1,12 @@
|
||||
! { dg-do run }
|
||||
! { dg-additional-sources f2c_5.c }
|
||||
! { dg-options "-fno-f2c" }
|
||||
! Check calling conventions without -ff2c
|
||||
program f2c_5
|
||||
call f2c_5a()
|
||||
end
|
||||
|
||||
real function f2c_5b(x)
|
||||
double precision x
|
||||
f2c_5b = x
|
||||
end
|
@ -188,6 +188,6 @@ proc gfortran_target_compile { source dest type options } {
|
||||
lappend options "compiler=$GFORTRAN_UNDER_TEST"
|
||||
|
||||
set options [concat "$ALWAYS_GFORTRANFLAGS" $options]
|
||||
|
||||
set options [dg-additional-files-options $options $source]
|
||||
return [target_compile $source $dest $type $options]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user