3 Replies Latest reply on Nov 9, 2009 9:29 PM by hazeman

    Possible compiler bug ( volatile qualifier )

    hazeman

      Access to memory with volatile qualifier is optimized out by compiler ( only first access is generated to IL/ISA , following reads from the same address are removed ). 

      Sample code

      global volatile flot4* v;

      a1 = v[0]; <- this read is generated

      a2 = v[0]; <- optimized out

      a3 = v[0]; <- optimized out

      The standard says "The type qualifiers const, restrict, volatile as defined by the C99 specification are supported". So I think this needs to be corrected.