This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/41435] New: GCC doesn't fold complex int division
- From: "ghazi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Sep 2009 15:28:15 -0000
- Subject: [Bug middle-end/41435] New: GCC doesn't fold complex int division
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
For integral complex types like complex int, GCC doesn't fold division with
constant arguments. E.g. this testcase should evaluate at compile-time and
link without any errors but doesn't:
extern void link_error(void);
#define EXPR ((2 + 4i) / 2)
int main(void)
{
if (__real EXPR != 1 || __imag EXPR != 2)
link_error();
return 0;
}
--
Summary: GCC doesn't fold complex int division
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ghazi at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41435