Re: [PATCH] Do not use lang_hooks.types.type_for_size in signed_or_unsigned_type_for

2012-03-12 Thread Richard Guenther
On Wed, 7 Mar 2012, Richard Guenther wrote: On Wed, 7 Mar 2012, Michael Matz wrote: Hi, On Wed, 7 Mar 2012, Richard Guenther wrote: FAIL: gcc.dg/tree-ssa/pr31261.c scan-tree-dump-times original return \\(char\\) -\\(unsigned char\\) c 31; 1 FAIL:

[PATCH] Do not use lang_hooks.types.type_for_size in signed_or_unsigned_type_for

2012-03-07 Thread Richard Guenther
This makes us use build_nonstandard_integer_type in signed_or_unsigned_type_for and adjusts the function to return NULL_TREE for non-sensical inputs (only allowing pointer and integeral types). This way we make sure that the precision of the result type matches that of the input - something

Re: [PATCH] Do not use lang_hooks.types.type_for_size in signed_or_unsigned_type_for

2012-03-07 Thread Michael Matz
Hi, On Wed, 7 Mar 2012, Richard Guenther wrote: FAIL: gcc.dg/tree-ssa/pr31261.c scan-tree-dump-times original return \\(char\\) -\\(unsigned char\\) c 31; 1 FAIL: gcc.dg/tree-ssa/pr31261.c scan-tree-dump-times original return \\(int\\) \\(12 - \\(unsigned int\\) d\\) 7; 1 because

Re: [PATCH] Do not use lang_hooks.types.type_for_size in signed_or_unsigned_type_for

2012-03-07 Thread Richard Guenther
On Wed, 7 Mar 2012, Michael Matz wrote: Hi, On Wed, 7 Mar 2012, Richard Guenther wrote: FAIL: gcc.dg/tree-ssa/pr31261.c scan-tree-dump-times original return \\(char\\) -\\(unsigned char\\) c 31; 1 FAIL: gcc.dg/tree-ssa/pr31261.c scan-tree-dump-times original return \\(int\\)