--- Comment #9 from rguenth at gcc dot gnu dot org 2009-08-13 08:56 ---
From a look at the sources it seems that _M_x is at offset zero.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41019
--- Comment #10 from irar at il dot ibm dot com 2009-08-13 11:34 ---
Reduced testcase:
#include stdlib.h
#include stdio.h
#define N 4
long int a[N];
int main ()
{
int k;
for (k = 0; k N; ++k)
a[k] = a[k] != 5 ? 12 : 10;
for (k = 0; k N; ++k)
printf (%u , a[k]);
--- Comment #11 from irar at il dot ibm dot com 2009-08-13 11:36 ---
Created an attachment (id=18350)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18350action=view)
The assembly for the long int version (wrong code)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41019
--- Comment #12 from irar at il dot ibm dot com 2009-08-13 11:37 ---
Created an attachment (id=18351)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18351action=view)
The assembly for the int version (correct)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41019
--- Comment #6 from irar at il dot ibm dot com 2009-08-12 12:14 ---
Looks like a problem in data-ref analysis:
Creating dr for this_6(D)-_M_x[__k_87]
...
base_address: this_6(D)
offset from base address: 0
constant offset from base address: 0
step: 8
--- Comment #7 from rguenther at suse dot de 2009-08-12 12:37 ---
Subject: Re: Variate_generator with mt19937
and normal_distribution produces wrong sequence for -O3.
On Wed, 12 Aug 2009, irar at il dot ibm dot com wrote:
--- Comment #6 from irar at il dot ibm dot com
--- Comment #4 from rguenth at gcc dot gnu dot org 2009-08-11 15:24 ---
Disabling vectorization fixes the problem (-fno-tree-vectorize), happens on
trunk as well. 4.3 doesn't like the testcase, so it's not yet a regression.
--
rguenth at gcc dot gnu dot org changed:
--- Comment #5 from afoglia at gmail dot com 2009-08-11 20:17 ---
(In reply to comment #4)
Disabling vectorization fixes the problem (-fno-tree-vectorize), happens on
trunk as well. 4.3 doesn't like the testcase, so it's not yet a regression.
4.3 may not like the test case, but if