Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 129008 - gcc-4.1 miscompiles altivec constants.
Summary: gcc-4.1 miscompiles altivec constants.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC Linux
: Highest normal (vote)
Assignee: Luca Barbato
URL: http://gcc.gnu.org/bugzilla/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-06 02:31 UTC by Luca Barbato
Modified: 2006-04-13 14:59 UTC (History)
3 users (show)

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


Attachments
simple fix, disable this path for odd consts (gcc-4.1-altivec-const.patch,607 bytes, patch)
2006-04-06 02:36 UTC, Luca Barbato
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Barbato gentoo-dev 2006-04-06 02:31:55 UTC
Excerpt from upstream bug

typedef union
{
  int i[4];
  __attribute__((altivec(vector__))) int v;
} vec_int4;

int main (void)
{
   vec_int4 i1;

   i1.v = (__attribute__((altivec(vector__))) int){31, 31, 31, 31};
   printf ("%d\n", i1.i[0]);

   return 0;
}

the output printed is 30, not 31.

Refer to the url to see the rest.
Comment 1 Luca Barbato gentoo-dev 2006-04-06 02:36:06 UTC
Created attachment 84056 [details, diff]
simple fix, disable this path for odd consts

Here is the simplest solution, a smarter one may follow
Comment 2 Mark Loeser (RETIRED) gentoo-dev 2006-04-07 17:42:48 UTC
I'm waiting for upstream to decide on how they are going to fix this before I add any patches.
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2006-04-07 20:46:34 UTC
This really isn't a blocker, since gcc-4.1 is still p.masked.
Comment 4 Mark Loeser (RETIRED) gentoo-dev 2006-04-13 14:59:51 UTC
Added to CVS.  This will be included in the next patchset.