Right now dotprod_c* does: ./generated/dotprod_c4.c: COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); ./generated/dotprod_c16.c: COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); ./generated/dotprod_c8.c: COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); ./generated/dotprod_c10.c: COMPLEX_ASSIGN(conjga, REALPART (*pa), -IMAGPART (*pa)); When it should be doing: conjga = conj(*pa); or conjga = conjl(*pa); or conjga = conjf(*pa); Depending on which type it is. Or it could use the GNU extension which overrides ~ for conjugation. conjga = ~*pa;
Confirmed.
(In reply to comment #0) > conjga = conj(*pa); > or > conjga = conjl(*pa); > or > conjga = conjf(*pa); I'm ready to do that, but since complex numbers in C are always a pain, I want to know: are we sure that conj/conjf/conjl are *always* available? I mean, are they part of the things gcc provides even if there is no library support for them in the runtime libm?
(In reply to comment #2) > I'm ready to do that, but since complex numbers in C are always a pain, I > want to know: are we sure that conj/conjf/conjl are *always* available? I > mean, are they part of the things gcc provides even if there is no library > support for them in the runtime libm? Hmm, I have to think about that but you can always use the GCC extension :) as mentioned before. I think the builtin version of conj/conjf/conjl (__builtin_conj/__builtin_conjf/__builtin_conjl) is always expanded to CONJ_EXPR but I could be wrong.
Subject: Bug 24903 Author: fxcoudert Date: Thu Feb 16 07:52:22 2006 New Revision: 111131 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111131 Log: PR libfortran/24903 * m4/dotprodc.m4: Use __builtin_conj instead of assigning real and imaginary parts separately. * generated/dotprod_c4.c: Regenerated. * generated/dotprod_c8.c: Regenerated. * generated/dotprod_c10.c: Regenerated. * generated/dotprod_c16.c: Regenerated. Modified: trunk/libgfortran/ChangeLog trunk/libgfortran/generated/dotprod_c10.c trunk/libgfortran/generated/dotprod_c16.c trunk/libgfortran/generated/dotprod_c4.c trunk/libgfortran/generated/dotprod_c8.c trunk/libgfortran/m4/dotprodc.m4
Subject: Bug 24903 Author: fxcoudert Date: Sat Mar 4 08:53:18 2006 New Revision: 111708 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111708 Log: PR libfortran/24903 * m4/dotprodc.m4: Use __builtin_conj instead of assigning real and imaginary parts separately. * generated/dotprod_c4.c: Regenerated. * generated/dotprod_c8.c: Regenerated. * generated/dotprod_c10.c: Regenerated. * generated/dotprod_c16.c: Regenerated. Modified: branches/gcc-4_1-branch/libgfortran/ChangeLog branches/gcc-4_1-branch/libgfortran/generated/dotprod_c10.c branches/gcc-4_1-branch/libgfortran/generated/dotprod_c16.c branches/gcc-4_1-branch/libgfortran/generated/dotprod_c4.c branches/gcc-4_1-branch/libgfortran/generated/dotprod_c8.c branches/gcc-4_1-branch/libgfortran/m4/dotprodc.m4
Fix commited to 4.1.