From: "Richard Guenther" <richard.guent...@gmail.com>

Thanks, I do want to test the middle-end.  However I need to do more than
just create the complex expression.  I also have to pass it to a builtin
that evaluates using MPC like __builtin_csin().  The fortran frontend
evaluates complex transcendentals in fortran/simplify.c, not in the
middle-end. So it wouldn't test what I want AFAICT. It's not a big deal,
the nan cases are error paths that should *avoid* folding via MPC.

If you go through memory the compiler should promote that to a register
and constant propagate the result, isn't that enough?

All the previous tests of this nature were in gcc.dg/torture/builtin-math-*.c and are done at all opt levels including -O0. I think your suggestion works, but only when optimizing. Also, I think it doesn't work with -fdump-tree-original, I'd have to inspect a different dump file. (Any thoughts on which one?)

The obsessive part of my brain wants to keep everything the same as the other tests. :-) But I suppose it would work, I just have to tweek it with these things in mind.

       --Kaveh


Reply via email to