[Bug fortran/54463] -fdefault-real-8 does not promote the BLAS call when using -fexternal-blas

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 5 10:22:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54463

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-09-05 10:21:53 UTC ---
(In reply to comment #1)
> This bug report should be closed.  Combining
> -fexternal-blas and -fdefault-real-8 would 
> add needless complexity to the compiler.

I think a patch like mine in comment 2 should be sufficient and it not that
complex.


> The correct solution is to write proper Fortran
> code.  To be even more specific, don't use 
> -fdefault-real-8.  It was a really, really,
> bad idea and was only supplied to give
> backwards compatibility with g77.

Well, many compilers have such a flag and there are several programs which rely
on the presence of such a flag. It might not be the most sensible to write
programs that way, but it is common enough that a compiler should support it.


[Comment to my patch:]
(In reply to comment #3)
> What about -freal-4-real-10 -freal-4-real-16 -freal-4-real-8
> -freal-8-real-10 -freal-8-real-16 and -freal-8-real-4?

Ugh, those flags are ugly! (Actually, I think you approved that patch, which I
regard as worse than -fdefault-real-8.) the -freal-*-real-* flags completely
messes up everything. However, since everything is handled in primary.c/decl.c,
the internal kind numbers should be fine. (There are bits in trans-types.c, but
they only error out when a given kind doesn't exist.)

Of course, I assume that one doesn't mess around with -fdefault-real-8 or
-freal-4-real-10 when compiling BLAS. If one does this, one gets what one
deserves.



More information about the Gcc-bugs mailing list