Apparently, the default algorithm (the other one available is selectable via flag_complex_divide_method = 1) is the naive one, which is not able to deal correctly with "large" denominators. For some additional details, see:
http://gcc.gnu.org/ml/gcc-bugs/2004-12/msg00820.html I'm attaching a trivial, pure C, testcase, showing at least inconsistency in the behaviors for real vs complex types. Swithing to flag_complex_divide_method = 1 fixes simple testcases, but maybe we really want the full C99-conforming algo, as sketched in Annex G. In that case this would be a (high priority ;) request for enhancement. -- Summary: Naive (default) complex division algorithm Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pcarlini at suse dot de CC: bkoz at redhat dot com,gcc-bugs at gcc dot gnu dot org,gdr at integrable-solutions dot net GCC build triplet: Any GCC host triplet: Any GCC target triplet: Any http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18902