------- Comment #2 from rguenth at gcc dot gnu dot org  2008-10-14 13:20 -------
It is indeed an aliasing violation, you store a long and read a long*.

Fix it like

int main()
{
        int i;
        long a;
        long **b = malloc(8 * sizeof(long));

        for (i = 0; i < 8; i++)
                *b++ = &a;

        b--;
        foo(6, (void **)b);


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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

Reply via email to