public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27129]  New: [4.1/4.2 Regression] ICE in get_expr_operands
@ 2006-04-12  9:43 jakub at gcc dot gnu dot org
  2006-04-12 11:17 ` [Bug c++/27129] " reichelt at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-04-12  9:43 UTC (permalink / raw)
  To: gcc-bugs

static const float a = 0.299f;
static const float b = 0.114f;
static const float c = 1 - a - c;

float
foo (void)
{
  return a + b + c;
}

ICEs at -O and higher.  There is a typo (should have been 1 - a - b of course),
but IMHO that just triggers undefined behavior.
G++ 4.0.x would initialize c in __static_initialization_and_destruction_0(int,
int) and compile it without ICE, where foo would be return 0.413f + c;
In 4.1.0+, apparently c is initialized to error_mark_node, although no error
nor even a warning is emitted at compile time, and obviously various later
optimizers are upset when seeing error_mark_node on unexpected places,
errorneous
input is not supposed to reach that far ever.


-- 
           Summary: [4.1/4.2 Regression] ICE in get_expr_operands
           Product: gcc
           Version: 4.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org


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


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

end of thread, other threads:[~2007-04-29 14:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-12  9:43 [Bug c++/27129] New: [4.1/4.2 Regression] ICE in get_expr_operands jakub at gcc dot gnu dot org
2006-04-12 11:17 ` [Bug c++/27129] " reichelt at gcc dot gnu dot org
2006-04-12 14:00 ` prigault at oricom dot ca
2006-04-16 19:48 ` mmitchel at gcc dot gnu dot org
2006-04-18 16:12 ` bonzini at gnu dot org
2006-05-16 13:15 ` jakub at gcc dot gnu dot org
2006-05-25  2:40 ` mmitchel at gcc dot gnu dot org
2006-06-03 22:37 ` pinskia at gcc dot gnu dot org
2006-06-09  9:42 ` jakub at gcc dot gnu dot org
2007-04-29 14:55 ` reichelt at gcc dot gnu dot org
2007-04-29 14:55 ` reichelt 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).