charfi asma <charfiasma@xxxxxxxx> writes: > this is the simplified code that GCC did not optimize when I compile > the C++ code using -Os. (I used GCC: (GNU) 4.6.0 20110218 ) perhaps it > deals with GCC intra optimizations ... Using this example code, gcc 4.6.1 also doesn't merge the if-blocks for me either (with -O2 or -Os). gcc 4.7 (Debian 20110924-1) _does_ merge the if-blocks with -O2, but _not_ with -Os. [this seems slightly odd; isn't this kind of tail-merging almost guaranteed to be a big win for -Os?] -Mile -- Defenceless, adj. Unable to attack.