This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [4.5 C] Fix types in fold_builtin_sincos


Richard Guenther wrote:
> On Sat, Jan 17, 2009 at 12:55 AM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
>> After my latest merge to c-4_5-branch from trunk some ICEs appeared
>> arising from fold_builtin_sincos building MODIFY_EXPRs in void_type_node
>> and then trying to use a COMPOUND_EXPR to convert to a non-void type.  (I
>> don't know why this didn't cause ICEs before; I don't think such trees,
>> where COMPOUND_EXPR involves a nontrivial conversion, are valid.)
> 
> That's weird.  a MODIFY_EXPR doesn't have a type, so using void_type_node
> is exactly correct.  What is using the type of the MODIFY_EXPR?

The COMPOUND_EXPR around it, which has a type too?

> It's better
> to fix that instead - if you grep for MODIFY_EXPR and void_type_node there
> are a lot more offenders otherwise.

A MODIFY_EXPR may indeed have a non-void type in GENERIC since "a = b =
c" can be represented in valid GENERIC by MODIFY_EXPR<a, MODIFY_EXPR<b, c>>.

Joseph's patch seems obvious to me.

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]