Bug 220258 - ICE when using 64-bit sync primitives for x86
Summary: ICE when using 64-bit sync primitives for x86
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-19 22:38 UTC by Ulrich Drepper
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-12-21 08:08:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


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

Description Ulrich Drepper 2006-12-19 22:38:02 UTC
Description of problem:
This little piece of code ICEs gcc when compiled for x86:

long long a;
void f(long long b) {
  __sync_bool_compare_and_swap (&a, 1, b);
}

It is necessary to add -march=i686 to the command line to enable using cmpxchg8b.


Version-Release number of selected component (if applicable):
4.1.1-30
4.1.1-45

How reproducible:
always when compiling on x86-64 with -m32
haven't tried native x86

Steps to Reproduce:
1.gcc -S -m32 ice.c -march=i686
2.
3.
  
Actual results:
u.c: In function ‘f’:
u.c:3: internal compiler error: Segmentation fault


Expected results:
Code using cmpxchg8b

Additional info:

Comment 1 Jakub Jelinek 2006-12-21 08:08:08 UTC
Fixed in gcc-4.1.1-48.


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