public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36912]  New: ICE when building with "-frounding-math -g"
@ 2008-07-23 21:18 drussel at gmail dot com
  2008-07-23 21:21 ` [Bug c++/36912] " pinskia at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: drussel at gmail dot com @ 2008-07-23 21:18 UTC (permalink / raw)
  To: gcc-bugs

static const double Eps = .0000001; 
static const double Tol = 1.0+Eps;
int main(int, char *[]) {
return 0;
}

Fedora 9.

Works fine on MacOs 10.5 with gcc 4.0.

setting Eps to be an integral value (but keeping its type to be double) makes
the ICE go away.


-- 
           Summary: ICE when building with "-frounding-math -g"
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: drussel at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] ICE when building with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
@ 2008-07-23 21:21 ` pinskia at gcc dot gnu dot org
  2008-08-13 20:49 ` [Bug c++/36912] [4.2/4.3/4.4 regression] ICE " reichelt at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-23 21:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-07-23 21:21 -------
t.c:5: error: initializer for floating value is not a floating constant
t.c:5: internal compiler error: tree check: expected real_cst, have plus_expr
in output_constant, at varasm.c:4429
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.2/4.3/4.4 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
  2008-07-23 21:21 ` [Bug c++/36912] " pinskia at gcc dot gnu dot org
@ 2008-08-13 20:49 ` reichelt at gcc dot gnu dot org
  2008-08-14  8:04 ` jakub at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-08-13 20:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reichelt at gcc dot gnu dot org  2008-08-13 20:48 -------
The following line triggers the ICE since GCC 4.1.0:

================================
const double c = .1, d = c+1;
================================


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code, monitored
   Last reconfirmed|0000-00-00 00:00:00         |2008-08-13 20:48:09
               date|                            |
            Summary|ICE when building with "-   |[4.2/4.3/4.4 regression] ICE
                   |frounding-math -g"          |with "-frounding-math -g"
   Target Milestone|---                         |4.2.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.2/4.3/4.4 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
  2008-07-23 21:21 ` [Bug c++/36912] " pinskia at gcc dot gnu dot org
  2008-08-13 20:49 ` [Bug c++/36912] [4.2/4.3/4.4 regression] ICE " reichelt at gcc dot gnu dot org
@ 2008-08-14  8:04 ` jakub at gcc dot gnu dot org
  2008-08-14 12:19 ` joseph at codesourcery dot com
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-14  8:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2008-08-14 08:03 -------
I think the primary question is, do we expect -frounding-math to force this to
be evaluated at runtime or not?
If it should be evaluated at runtime, then I'd say initializer_constant_valid_p
should reject PLUS_EXPR and MINUS_EXPR with FLOAT_TYPE_P (endtype) (and maybe
also narrowing casts like (float) double) if flag_rounding_math.  If it
shouldn't be evaluated at runtime, we'd need to figure out where to call
(perhaps recursively) the fold*initializer calls - that's something only the C
FE uses, but not C++.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.2/4.3/4.4 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (2 preceding siblings ...)
  2008-08-14  8:04 ` jakub at gcc dot gnu dot org
@ 2008-08-14 12:19 ` joseph at codesourcery dot com
  2008-08-14 18:13 ` jakub at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: joseph at codesourcery dot com @ 2008-08-14 12:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from joseph at codesourcery dot com  2008-08-14 12:18 -------
Subject: Re:  [4.2/4.3/4.4 regression] ICE with "-frounding-math
 -g"

On Thu, 14 Aug 2008, jakub at gcc dot gnu dot org wrote:

> I think the primary question is, do we expect -frounding-math to force this to
> be evaluated at runtime or not?

For C, it's evaluated at compile time per Annex F, so the question is what 
makes most sense in a specifically C++ context.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.2/4.3/4.4 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (3 preceding siblings ...)
  2008-08-14 12:19 ` joseph at codesourcery dot com
@ 2008-08-14 18:13 ` jakub at gcc dot gnu dot org
  2008-08-18 16:13 ` sylvain dot pion at sophia dot inria dot fr
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-14 18:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2008-08-14 18:11 -------
Yeah.  In C we won't see addition or subtraction of 2 FLOAT_TYPE_P constants in
initializer_constant_valid_p, as it has been folded.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org, jason at gcc dot gnu
                   |                            |dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.2/4.3/4.4 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (4 preceding siblings ...)
  2008-08-14 18:13 ` jakub at gcc dot gnu dot org
@ 2008-08-18 16:13 ` sylvain dot pion at sophia dot inria dot fr
  2008-08-22 15:00 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2008-08-18 16:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from sylvain dot pion at sophia dot inria dot fr  2008-08-18 16:12 -------
Maybe my comment is going to be out of scope, but the question is also
to know what the "primary question" is here, that is, what usage is supposed
to be supported by -frounding-math.

g++ currently accepts code like the following (in non-pedantic mode) :

  template <int i> struct A {};
  A<(int) (1.5-2.0)> a;

I am not sure it would be wise to have -frounding-math break this
(I understand that this would be a consequence of one of Jakub's proposals).

There are users who would like to see constant propagation of floats,
obviously, even with -frounding-math.
(see also C++0x's constexpr which requires this ability, I think).

And there are users who would like to have constant propagation aware
of the rounding mode (either deferring the computation at runtime,
and/or have a way to tell the compiler which rounding mode to use at
compile-time).  It's also related to the FENV_ACCESS pragma.

The current behavior of -frounding-math which keeps on propagating
floats constants is not nice for interval arithmetic code (the main
user of -frounding-math I guess?): you need to protect against the
compiler in ways which affects performance (and code clarity like
introducing volatiles or other workarounds in odd places...).

The fact that -frounding-math affects the whole translation unit is
also problematic.  Usually, it's only in very particular places that
you need to tell the compiler that a block of code needs such an
attention.


Ideally, for me, one should have the option to tell the compiler that
a block of code (e.g. using the new option attributes, or a pragma
a la FENV_ACCESS), or maybe even a single operation, depends on a
non-default rounding-mode, hence stopping inexact constant propagation
and other transformations.
As a bonus, it would be great to also have a way to tell the compiler
that the rounding-mode to be used is known at compile-time.


One could add another option e.g. -frounding-math-at-runtime to distinguish
the two behaviors mentioned by Jakub, but IMO this would not be helpful
for the users who want to mix the 2 features in the same translation unit.


My 2 cents.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.2/4.3/4.4 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (5 preceding siblings ...)
  2008-08-18 16:13 ` sylvain dot pion at sophia dot inria dot fr
@ 2008-08-22 15:00 ` rguenth at gcc dot gnu dot org
  2008-12-09 19:22 ` mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-08-22 15:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2008-08-22 14:59 -------
Interestingly enough this is only broken on the trunk for me, where we reject
the code.

/abuild/rguenther/trunk-g/gcc/t.ii:1: error: initializer for floating value is
not a floating constant
/abuild/rguenther/trunk-g/gcc/t.ii:1: confused by earlier errors, bailing out

Can we decide what is the bug here and appropriately split this bug into
rejects-valid or accepts-invalid for gcc < 4.4 and ice-on-{in}valid for 4.4?

Due to the unclear status and mixing stuff I leave this P3.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
           Keywords|                            |accepts-invalid, error-
                   |                            |recovery, ice-on-invalid-
                   |                            |code, rejects-valid


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.2/4.3/4.4 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (6 preceding siblings ...)
  2008-08-22 15:00 ` rguenth at gcc dot gnu dot org
@ 2008-12-09 19:22 ` mmitchel at gcc dot gnu dot org
  2008-12-09 20:05 ` sylvain dot pion at sophia dot inria dot fr
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-12-09 19:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from mmitchel at gcc dot gnu dot org  2008-12-09 19:20 -------
With respect to Comment #4: I see no reason for C++ to be different than C in
this respect, and thus I see no reason not to perform the computation at
compile-time.

In general, although some in the committees do not seem to care, users expect C
to be a subset of C++.  Certainly, wherever the standards permit us to do so,
we should make GNU C and GNU C++ behave identically; compiling C code as C++
with the same toolset and getting different results leads to user surprise.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.2/4.3/4.4 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (7 preceding siblings ...)
  2008-12-09 19:22 ` mmitchel at gcc dot gnu dot org
@ 2008-12-09 20:05 ` sylvain dot pion at sophia dot inria dot fr
  2009-03-31 20:57 ` [Bug c++/36912] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sylvain dot pion at sophia dot inria dot fr @ 2008-12-09 20:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from sylvain dot pion at sophia dot inria dot fr  2008-12-09 20:03 -------
Incidentally, I submitted to WG21 a few days ago a proposal which will appear
in the coming mid-term mailing as N2811, named "Directed Rounding Arithmetic
Operations".  In the meantime, you can find it here:
http://www-sop.inria.fr/members/Sylvain.Pion/cxx/rounded_operations_N2811.pdf

This document proposes the addition of functions like:

--------------------------------------------------------------
template < float_round_style r, FloatingPointLike T, FloatingPointLike U >
requires True<(r != round_indeterminate)>
constexpr auto add(T t, U u) -> decltype(t + u);

Returns: The addition of t and u rounded according to r.
--------------------------------------------------------------

(and similarly for sub, mul, div, sqrt, fma, and int<->float and float<->float
conversions).

With these, it would be possible to explictly attach a rounding mode to an
operation in the source code.  Moreover, their constexpr nature would mean that
they would work for compile-time constants as well.  This would require a bit
of help from the compiler.

That would mean that code which cares about rounding modes would have a way to
say so, and then, other codes can more easily be dealt with (that is: no need
to bother thinking about the effect of -frounding-math on compile-time
constants computations).

(comments on the proposal are welcome, BTW)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (8 preceding siblings ...)
  2008-12-09 20:05 ` sylvain dot pion at sophia dot inria dot fr
@ 2009-03-31 20:57 ` jsm28 at gcc dot gnu dot org
  2009-08-04 12:51 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jsm28 at gcc dot gnu dot org  2009-03-31 20:56 -------
Closing 4.2 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3/4.4/4.5 regression]|[4.3/4.4/4.5 regression] ICE
                   |ICE with "-frounding-math - |with "-frounding-math -g"
                   |g"                          |
   Target Milestone|4.2.5                       |4.3.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (9 preceding siblings ...)
  2009-03-31 20:57 ` [Bug c++/36912] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
@ 2009-08-04 12:51 ` rguenth at gcc dot gnu dot org
  2009-09-20 20:09 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.4                       |4.3.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (10 preceding siblings ...)
  2009-08-04 12:51 ` rguenth at gcc dot gnu dot org
@ 2009-09-20 20:09 ` pinskia at gcc dot gnu dot org
  2009-11-04 22:15 ` jason at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-09-20 20:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2009-09-20 20:09 -------
t.cc:5:1: error: initializer for floating value is not a floating constant
t.cc:5:1: internal compiler error: tree check: expected real_cst, have
plus_expr in output_constant, at varasm.c:4545
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


The ICE is still there ...


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
   Last reconfirmed|2008-08-13 20:48:09         |2009-09-20 20:09:14
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (11 preceding siblings ...)
  2009-09-20 20:09 ` pinskia at gcc dot gnu dot org
@ 2009-11-04 22:15 ` jason at gcc dot gnu dot org
  2009-11-04 23:13 ` jason at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-04 22:15 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-09-20 20:09:14         |2009-11-04 22:15:15
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (12 preceding siblings ...)
  2009-11-04 22:15 ` jason at gcc dot gnu dot org
@ 2009-11-04 23:13 ` jason at gcc dot gnu dot org
  2009-11-05 13:12 ` jason at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-04 23:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jason at gcc dot gnu dot org  2009-11-04 23:13 -------
Subject: Bug 36912

Author: jason
Date: Wed Nov  4 23:13:23 2009
New Revision: 153921

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153921
Log:
        PR c++/36912
        * varasm.c (initializer_constant_valid_p): A PLUS_EXPR
        or MINUS_EXPR of REAL_TYPE is not a valid constant initializer.
        (output_constant): Avoid crash after error.

Added:
    trunk/gcc/testsuite/g++.dg/init/static-init2.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/varasm.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (13 preceding siblings ...)
  2009-11-04 23:13 ` jason at gcc dot gnu dot org
@ 2009-11-05 13:12 ` jason at gcc dot gnu dot org
  2009-11-05 14:47 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-05 13:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from jason at gcc dot gnu dot org  2009-11-05 13:11 -------
Subject: Bug 36912

Author: jason
Date: Thu Nov  5 13:11:42 2009
New Revision: 153936

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153936
Log:
        PR c++/36912
        * varasm.c (initializer_constant_valid_p): A PLUS_EXPR
        or MINUS_EXPR of REAL_TYPE is not a valid constant initializer.
        (output_constant): Avoid crash after error.

Added:
    trunk/gcc/testsuite/g++.dg/init/static-init2.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/varasm.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (14 preceding siblings ...)
  2009-11-05 13:12 ` jason at gcc dot gnu dot org
@ 2009-11-05 14:47 ` jason at gcc dot gnu dot org
  2009-11-05 16:33 ` jason at gcc dot gnu dot org
  2009-11-05 16:34 ` jason at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-05 14:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from jason at gcc dot gnu dot org  2009-11-05 14:47 -------
Subject: Bug 36912

Author: jason
Date: Thu Nov  5 14:47:24 2009
New Revision: 153941

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153941
Log:
        PR c++/36912
        * varasm.c (initializer_constant_valid_p): A PLUS_EXPR
        or MINUS_EXPR of REAL_TYPE is not a valid constant initializer.
        (output_constant): Avoid crash after error.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/init/static-init2.C
Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_4-branch/gcc/varasm.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (15 preceding siblings ...)
  2009-11-05 14:47 ` jason at gcc dot gnu dot org
@ 2009-11-05 16:33 ` jason at gcc dot gnu dot org
  2009-11-05 16:34 ` jason at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-05 16:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from jason at gcc dot gnu dot org  2009-11-05 16:32 -------
Subject: Bug 36912

Author: jason
Date: Thu Nov  5 16:32:36 2009
New Revision: 153947

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153947
Log:
        PR c++/36912
        * varasm.c (initializer_constant_valid_p): A PLUS_EXPR
        or MINUS_EXPR of REAL_TYPE is not a valid constant initializer.
        (output_constant): Avoid crash after error.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/init/static-init2.C
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_3-branch/gcc/varasm.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug c++/36912] [4.3/4.4/4.5 regression] ICE with "-frounding-math -g"
  2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
                   ` (16 preceding siblings ...)
  2009-11-05 16:33 ` jason at gcc dot gnu dot org
@ 2009-11-05 16:34 ` jason at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-05 16:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from jason at gcc dot gnu dot org  2009-11-05 16:34 -------
Fixed.  Discussion of changes to folding behavior with -frounding-math can
continue somewhere else.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2009-11-05 16:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-23 21:18 [Bug c++/36912] New: ICE when building with "-frounding-math -g" drussel at gmail dot com
2008-07-23 21:21 ` [Bug c++/36912] " pinskia at gcc dot gnu dot org
2008-08-13 20:49 ` [Bug c++/36912] [4.2/4.3/4.4 regression] ICE " reichelt at gcc dot gnu dot org
2008-08-14  8:04 ` jakub at gcc dot gnu dot org
2008-08-14 12:19 ` joseph at codesourcery dot com
2008-08-14 18:13 ` jakub at gcc dot gnu dot org
2008-08-18 16:13 ` sylvain dot pion at sophia dot inria dot fr
2008-08-22 15:00 ` rguenth at gcc dot gnu dot org
2008-12-09 19:22 ` mmitchel at gcc dot gnu dot org
2008-12-09 20:05 ` sylvain dot pion at sophia dot inria dot fr
2009-03-31 20:57 ` [Bug c++/36912] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
2009-08-04 12:51 ` rguenth at gcc dot gnu dot org
2009-09-20 20:09 ` pinskia at gcc dot gnu dot org
2009-11-04 22:15 ` jason at gcc dot gnu dot org
2009-11-04 23:13 ` jason at gcc dot gnu dot org
2009-11-05 13:12 ` jason at gcc dot gnu dot org
2009-11-05 14:47 ` jason at gcc dot gnu dot org
2009-11-05 16:33 ` jason at gcc dot gnu dot org
2009-11-05 16:34 ` jason at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).