Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117951 - [3.4/ICE] Vector code that crashes w/ -O -mmmx
Summary: [3.4/ICE] Vector code that crashes w/ -O -mmmx
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-05 15:19 UTC by Joël
Modified: 2006-01-29 10:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joël 2006-01-05 15:19:58 UTC
The following code, when compiled on x86 with "-O2 -mmmx" will crash gcc 3.4.5:

int main()
{
        union { __attribute__ ((mode(V8QI))) v; int i; } a, b;
        a.v = __builtin_ia32_punpcklbw(a.v, b.v);
        printf("%x", a.i);
}


Thanks,

Jo
Comment 1 Joël 2006-01-05 15:19:58 UTC
The following code, when compiled on x86 with "-O2 -mmmx" will crash gcc 3.4.5:

int main()
{
        union { __attribute__ ((mode(V8QI))) v; int i; } a, b;
        a.v = __builtin_ia32_punpcklbw(a.v, b.v);
        printf("%x", a.i);
}


Thanks,

Joël
Comment 2 Joël 2006-01-05 15:20:46 UTC
The error is:
"internal compiler error: in simplify_binary_operation, at simplify-rtx.c:2012"
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2006-01-05 15:24:38 UTC
Confirmed.  This does work on >=gcc-4 as far as I can tell though, so getting a fix upstream may be difficult.  I'll see if I can find the fix and backport it.
Comment 4 Mark Loeser (RETIRED) gentoo-dev 2006-01-29 10:50:03 UTC
Fixed in gcc-4.0.  I'd rather not incorporate patches unless they are absolutely needed.