This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/41435] New: GCC doesn't fold complex int division


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]