[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2019-02-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #30 from Richard Biener --- Author: rguenth Date: Tue Feb 19 12:46:48 2019 New Revision: 269015 URL: https://gcc.gnu.org/viewcvs?rev=269015=gcc=rev Log: 2019-02-19 Richard Biener PR middle-end/88074 * toplev.c

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2019-02-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #29 from Jakub Jelinek --- Author: jakub Date: Sat Feb 16 18:46:04 2019 New Revision: 268962 URL: https://gcc.gnu.org/viewcvs?rev=268962=gcc=rev Log: PR middle-end/88074 * simplify.c

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2019-02-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #28 from Jakub Jelinek --- Created attachment 45676 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45676=edit gcc9-pr88074.patch Incremental patch to tweak norm2 simplification. If e->value.real**2 would overflow or be close

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2019-02-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 Richard Biener changed: What|Removed |Added Status|ASSIGNED|NEW CC|

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2019-02-05 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 Jakub Jelinek changed: What|Removed |Added CC||burnus at gcc dot gnu.org,

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-12-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 Richard Biener changed: What|Removed |Added Priority|P3 |P2 --- Comment #25 from Richard Biener

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-12-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 Richard Biener changed: What|Removed |Added Target Milestone|7.4 |7.5

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-22 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #24 from rguenther at suse dot de --- On Wed, 21 Nov 2018, joseph at codesourcery dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 > > --- Comment #23 from joseph at codesourcery dot com dot com> --- > And, yes,

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-21 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #23 from joseph at codesourcery dot com --- And, yes, at least one extra bit in emin is needed for that sticky rounding code to work (because the user's source code may have a decimal constant that is slightly over half the least

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-21 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #22 from joseph at codesourcery dot com --- On Wed, 21 Nov 2018, rguenther at suse dot de wrote: > /* Nonzero value, possibly overflowing or underflowing. */ > mpfr_init2 (m, SIGNIFICAND_BITS); > inexact =

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 Richard Biener changed: What|Removed |Added Attachment #45039|0 |1 is obsolete|

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-21 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #20 from rguenther at suse dot de --- On Tue, 20 Nov 2018, joseph at codesourcery dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 > > --- Comment #19 from joseph at codesourcery dot com dot com> --- > On Tue,

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-20 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #19 from joseph at codesourcery dot com --- On Tue, 20 Nov 2018, rguenth at gcc dot gnu.org wrote: > if (fmt->emin < min_exp) > min_exp = fmt->emin - fmt->p + 1; > so somehow the formula fmt->emin

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #18 from Richard Biener --- Author: rguenth Date: Tue Nov 20 12:18:58 2018 New Revision: 266313 URL: https://gcc.gnu.org/viewcvs?rev=266313=gcc=rev Log: 2018-11-20 Richard Biener PR tree-optimization/88074 *

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #17 from Richard Biener --- Created attachment 45039 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45039=edit not working patch

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 Richard Biener changed: What|Removed |Added CC||jsm28 at gcc dot gnu.org --- Comment

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #15 from Richard Biener --- (In reply to jos...@codesourcery.com from comment #13) > MPFR deals with larger exponent ranges for intermediate computations > itself (MPFR functions generally set the maximum possible exponent range >

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #14 from Richard Biener --- (In reply to jos...@codesourcery.com from comment #12) > Note that such issues are not unique to ctan. > > E.g., compiling __builtin_jn (10, 1e10) will produce such a hang. > The difference is

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #13 from joseph at codesourcery dot com --- MPFR deals with larger exponent ranges for intermediate computations itself (MPFR functions generally set the maximum possible exponent range internally). MPC generally doesn't seem to,

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #12 from joseph at codesourcery dot com --- Note that such issues are not unique to ctan. E.g., compiling __builtin_jn (10, 1e10) will produce such a hang. The difference is that in the ctan case the additional algorithm

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #11 from Richard Biener --- A GCC-side fix is to limit the exponent range mpfr uses (for TFmode this is -16381 to 16384). Not sure if mpfr or mpc need larger exponent ranges for intermediate computations... Lazily initialized in

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #10 from Richard Biener --- OK, so it seems to be about large imagparts only and only if the realpart is non-zero. Thus in GCC we could stop folding ctan for imagpart (z) > 1000 for example. Like sin and cos tan is _usually_

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #9 from Richard Biener --- It has something to do with large real/imagparts, the actual numbers are not so interesting. Somebody why knows how complex tan behaves might suggest a workaround for GCC to drop to Inf/NaN at some point?

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #8 from Richard Biener --- See gmp-bugs followup. (all other mails still wait for moderators) https://gmplib.org/list-archives/gmp-bugs/2018-November/004440.html

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #7 from Andrew Pinski --- (In reply to Richard Biener from comment #6) > but I'll try what we recommend as prerequesites now. This is what I used and it causes the same issue: GNU C++11 (Marvell Development Version) version 7.3.0

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #6 from Richard Biener --- Reported to the GMP mailinglist, not sure which libaries fault it is. To complete library version list, GCC reports GNU C17 (SUSE Linux) version 8.2.1 20180831 [gcc-8-branch revision 264010]

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #5 from Richard Biener --- C testcase: #include int main() { _Complex double x; __real x = 3.09126495087690770626068115234375e+8; __imag x = -4.045689747817175388336181640625e+8; volatile _Complex double y = ctan (x);

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #4 from Richard Biener --- I'm using mpc 1.0.2.

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 --- Comment #3 from Richard Biener --- Hmm, we never return from __gmpn_sqr_basecase_x86_64 ... #0 0x7734b92b in __gmpn_addlsh2_n_x86_64 () from /usr/lib64/libgmp.so.10 #1 0x004c in ?? () #2 0x7fff2c50 in ?? ()

[Bug tree-optimization/88074] [7/8/9 Regression] g++ hangs on math expression

2018-11-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074 Richard Biener changed: What|Removed |Added Status|NEW |ASSIGNED Known to work|