Bug 1017708 - asm goto miscompilation
asm goto miscompilation
Status: CLOSED ERRATA
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gcc (Show other bugs)
DTS 2.1 RHEL 6
Unspecified Unspecified
unspecified Severity high
: alpha
: 2.4
Assigned To: Jakub Jelinek
Dagmar Prokopová
:
Depends On: 1017704
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-10 07:20 EDT by Marek Polacek
Modified: 2014-07-01 18:54 EDT (History)
7 users (show)

See Also:
Fixed In Version: devtoolset-2-gcc-4.8.2-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1017704
Environment:
Last Closed: 2014-03-11 02:37:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 58670 None None None Never

  None (edit)
Description Marek Polacek 2013-10-10 07:20:41 EDT
+++ This bug was initially created as a clone of Bug #1017704 +++

__attribute__((noinline, noclone)) int
foo (int a, int b)
{
  if (a)
    return -3;
  asm volatile goto ("bts $1, %0; jc %l[lab]" : : "m" (b) : "memory" : lab);
  return 0;
lab:
  return 0;
}

int
main ()
{
  if (foo (1, 0) != -3 || foo (0, 3) != 0 || foo (0, 0) != 0)
    __builtin_abort ();
  return 0;
}

is miscompiled.

Jakub has a fix.
Comment 2 Marek Polacek 2013-10-17 08:02:15 EDT
Fixed in devtoolset-2-gcc-4.8.2-1.el6.
Comment 4 Dagmar Prokopová 2013-11-11 09:10:05 EST
Verified for devtoolset-2-gcc-4.8.2-1.
Comment 6 errata-xmlrpc 2014-03-11 02:37:14 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0272.html

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