------- Additional Comments From rguenth at gcc dot gnu dot org 2005-05-13 09:52 ------- The testcase is fine. We just optimize it no more with the STRIP_TYPE_NOPS change. This change was to avoid stripping type qualifiers such as const from lvalues - so we might need to use some other type stripping mechanism that preserves the current optimizations but avoids stripping qualifiers (we shouldn't strip a volatile qualifier from rvalues, too, f.i., but stripping a const qualifier from an rvalue is probably ok).
I know too little about all this to fix it myself, using f.i. tree_ssa_useless_type_conversion will again cause const being stripped. Patch reverted from 4.0 branch. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21538