On Thu, Feb 03, 2011 at 02:13:12PM -0500, Jesse M Draper wrote: > My patch to src/frontc/cabs2cil.ml checks for > "__builtin_object_size" and, following the pattern in > "__builtin_constant_p", drops the side effects.
I am not convinced this patch is correct (although current behaviour is obviously a bug). Gcc doc states: If there are any side-effects in them, it returns (size_t) -1 for type 0 or 1 and (size_t) 0 for type 2 or 3. which your patch does not perform. I'll think about it. > I have not been able to reproduce the problem on my Ubuntu system > because its gcc does not generate the call to __builtin_object_size, > and I have not figured out how gcc decides whether or not to generate > it. Could you please send the cilbug.c.i (produced on MacOS X)? I would like to include it in the testsuite. Best, -- Gabriel ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ CIL-users mailing list CIL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cil-users