This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18921] New: [4.0 Regression] wrong code with operator "?"
- From: "belyshev at lubercy dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Dec 2004 11:18:25 -0000
- Subject: [Bug tree-optimization/18921] New: [4.0 Regression] wrong code with operator "?"
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
this program aborts if compiled with any options:
----------------------------------------------------------------------------------------
extern void abort (void);
int foo (int k)
{
unsigned char j = 0;
(k ? 0 : j++) == -1;
return j;
}
int main ()
{
if (!foo (0))
abort ();
return 0;
}
----------------------------------------------------------------------------------------
--
Summary: [4.0 Regression] wrong code with operator "?"
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: critical
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belyshev at lubercy dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18921