i...@linux-fd1f:/tmp> cat tst.f90 subroutine foo(a,c,d,n) real, dimension(n),intent(in) :: a real, dimension(n),intent(out) :: c,d c = sin(a) d = cos(a) end subroutine foo i...@linux-fd1f:/tmp> gfortran -O3 -S tst.f90 i...@linux-fd1f:/tmp> grep sin tst.s call sinf i...@linux-fd1f:/tmp> grep cos tst.s call cosf
- The loops could be merged for better performance (no need to fetch a twice) - This could exploit use of the sincos function, where available -- Summary: sincos opportunity missed Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45661