[Bug fortran/54758] New: accessing gcc builtins from fortran
Joost.VandeVondele at mat dot ethz.ch
gcc-bugzilla@gcc.gnu.org
Sun Sep 30 08:07:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54758
Bug #: 54758
Summary: accessing gcc builtins from fortran
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Joost.VandeVondele@mat.ethz.ch
I would like to experiment with prefetching in Fortran code (beyond
-fprefetch-loop-arrays). A convenient way to do this would be access the
gcc_builtins. I tried this the following way:
INTERFACE
SUBROUTINE builtin_prefetch(a) BIND(C,name="__builtin_prefetch")
USE ISO_C_BINDING, ONLY: C_FLOAT
REAL(KIND=C_FLOAT), dimension(*) :: a
END SUBROUTINE
END INTERFACE
real*4 :: data(100)
DO i=1,100
CALL builtin_prefetch(data(i))
data(i)=0
ENDDO
END
but it didn't work...
test.f90:(.text+0x36): undefined reference to `__builtin_prefetch'
no surprise, I guess, but it would be cool if it did.
More information about the Gcc-bugs
mailing list