This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/29198] [4.0/4.1/4.2 Regression] Incorrect reference to __thread array with -fPIC -O2 on x86



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-09-24 05:34 -------
Here is a testcase which shows this is a latent bug:
extern int f2 (int, int, int, int);
struct s { char b[4]; };
__thread struct s a[2];
void f1 (int a1, int a2)
{
  int i, j;
  for (i = 0; i < 4; i++)
    {
      int tot = 0;
      for (j = 0; j < 4; j++)
        tot += f2 (a1, a2, i, j);
      *(&a[0].b[0] + i) = tot;
    }
 }


------
But since the orginal testcase worked in 3.4.0, this should be still marked as
a regression, IV-OPTs is causing the latent bug to show up.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29198


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]