This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/84019] [7/8 regression] ICE in fold-const of std::complex division
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 26 Jan 2018 15:44:38 +0000
- Subject: [Bug middle-end/84019] [7/8 regression] ICE in fold-const of std::complex division
- Auto-submitted: auto-generated
- References: <bug-84019-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84019
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The code in question is:
const struct real_format *const fmt =
REAL_MODE_FORMAT (TYPE_MODE (TREE_TYPE (type)));
const int prec = fmt->p;
const mp_rnd_t rnd = fmt->round_towards_zero ? GMP_RNDZ : GMP_RNDN;
const mpc_rnd_t crnd = fmt->round_towards_zero ? MPC_RNDZZ :
MPC_RNDNN;
int inexact;
mpc_t m0, m1;
mpc_init2 (m0, prec);
mpc_init2 (m1, prec);
and unless Debian builds the compiler with --disable-checking, REAL_MODE_FORMAT
should ICE if it is used with mode other than with MODE_FLOAT class or
DECIMAL_FLOAT_MODE_P. All the fmt modes have p in between 11 and 200 or so, so
I don't see how this is possible.