Bug 634757 - -O1 wrong-code by cmove
Summary: -O1 wrong-code by cmove
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 14
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 635508
TreeView+ depends on / blocked
 
Reported: 2010-09-16 21:41 UTC by Jan Kratochvil
Modified: 2012-12-23 00:52 UTC (History)
6 users (show)

Fixed In Version: gcc-4.5.1-4.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-27 03:56:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 45695 0 None None None Never

Description Jan Kratochvil 2010-09-16 21:41:19 UTC
tracker for the upstream Bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45695

Description of problem:
FSF GDB HEAD by FSF GCC 4.5.HEAD errors on `print 0|0' with -O1 and higher.

Version-Release number of selected component (if applicable):
FAIL: gcc-4.5.1-3.fc14.x86_64

How reproducible:
Always.

Steps to Reproduce:
gcc -O1 x.c
./a.out; echo $?

__attribute__((noinline, noclone)) void
g (int x)
{ 
  asm volatile ("");
}
__attribute__((noinline, noclone)) int
f (int a, int b, int d)
{
  int r = -1;
  b += d;
  if (d == a)
    r = b - d;
  g (b);
  return r; 
}
int 
main (void)
{ 
  asm volatile ("mov $42, %%rbx" : : : "rbx");
  return f (0, 1, 4) == 42 ? 1 : 0;
}

Actual results:
1

Expected results:
0

Additional info:

Comment 1 Fedora Update System 2010-09-24 22:14:18 UTC
gcc-4.5.1-4.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/gcc-4.5.1-4.fc14

Comment 2 Fedora Update System 2010-09-25 05:10:32 UTC
gcc-4.5.1-4.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update gcc'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/gcc-4.5.1-4.fc14

Comment 3 Fedora Update System 2010-09-27 03:56:32 UTC
gcc-4.5.1-4.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.