5 Replies Latest reply on May 7, 2013 7:08 AM by yanivk

    compiler bug???

    yanivk

      here is a code example that put the runtime compiler in an infinite loop

       

      typedef struct my_struct

      {

                unsigned char x;

                unsigned char y;

      }my_struct;

       

       

      __kernel void try_this(__global my_struct *pStruct)

      {

                my_struct a;

                int i;

                a = pStruct[1];

                i = a.x * a.y;

                printf("%d",i );

        }

       

       

      the driver version appearing in clinfo is 923.1 , i have tried compiling on Radeon 7660D

      it seems the structure copy is the problem , when changing x and y to int it works fine

       

      the printf is there only to prevent the compiler from ignoring the i calculation, it can be replaced with some output update

       

      can some verify this on the latest drivers or offer a solution ?

       

      Regards,

       

      Yaniv