[patch] Fix g++.dg/gomp/{pr27325.C,pr27337-2.C}.
Kazu Hirata
kazu@codesourcery.com
Thu Aug 16 02:29:00 GMT 2007
Hi Andrew and Diego,
>>> + if (targetm.cxx.cdtor_returns_this ())
>>> + /* Because constructors and destructors return this,
>>> + the call will have been cast to "void". Remove the
>>> + cast here. We would like to use STRIP_NOPS, but it
>>> + wouldn't work here because TYPE_MODE (t) and
>>> + TYPE_MODE (TREE_OPERAND (t, 0)) are different.
>>> + They are VOIDmode and Pmode, respectively. */
>>> + if (TREE_CODE (t) == NOP_EXPR)
>>> + t = TREE_OPERAND (t, 0);
>> Why not just STRIP_NOPs? Do we explicitly want to see through exactly
>> one NOP_EXPR here?
>
> The comment explains why you can't use STRIP_NOPs already. Now it
> could be with a loop, I was going to ask that question too.
Well, I don't have an example with two or more NOP_EXPR in series. All I
have is a CALL_EXPR wrapped with a single NOP_EXPR. I can change the "if"
to "while" if you like.
Kazu Hirata
More information about the Gcc-patches
mailing list