This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compiler options in testsuite..


gfortran.log gives:

/home/crickett/svnGcc/trunk/gcc/testsuite/gfortran.dg/c_kinds.c:11: error: 
ISO C90 does not support 'long long'

/home/crickett/svnGcc/trunk/gcc/testsuite/gfortran.dg/c_kinds.c: In 
function 'main':

/home/crickett/svnGcc/trunk/gcc/testsuite/gfortran.dg/c_kinds.c:27: error: 
ISO C90 does not support 'long long'


the top few lines of the C file are:

/* { dg-do compile } */
/* { dg-options "-std=c99" } */

#include <stdint.h>

void param_test(short int my_short, int my_int, long int my_long,
                long long int my_long_long, int8_t my_int8_t,
                int_least8_t my_int_least8_t, int_fast8_t my_int_fast8_t,
                int16_t my_int16_t, int_least16_t my_int_least16_t,
                int_fast16_t my_int_fast16_t, int32_t my_int32_t,
                int_least32_t my_int_least32_t, int_fast32_t 
                my_int_fast32_t,
                int64_t my_int64_t, int_least64_t my_int_least64_t,
                int_fast64_t my_int_fast64_t, intmax_t my_intmax_t,
                intptr_t my_intptr_t, float my_float, double my_double,
                long double my_long_double, char my_char);

the param_test is a Fortran routine, with bind(c), that i call from a C 
main to test the pass-by-value of the above types.  this works just fine, 
outside of the testsuite.  i copied this from my test dir, where it was 
working just fine because gcc defaults to gnu99.  

thanks for the help.
Chris



On Tue, 20 Jun 2006, Steve Kargl wrote:

> On Tue, Jun 20, 2006 at 05:38:55PM -0600, Christopher D. Rickett wrote:
> > i added another test to the testsuite for the c99 types used by the 
> > f03 draft for C interop.  however, i need to give gcc the -std=c99 flag 
> > in order for the C code to compile.  i added the dg-options... to the top 
> > of the C file, but it's still not compiling..
> > 
> > is there something i'm missing?  i've added the testcase to my local copy 
> > of gfortran.dg.
> > 
> 
> What's the error message in gfortran.log and what are
> the top fews lines of the C file (if not entire file)?
> 
> -- 
> Steve
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]