Re: [PR 79905] ICE with vector_type

2017-04-10 Thread Nathan Sidwell
On 04/06/2017 04:17 PM, Segher Boessenkool wrote: I don't like this cryptic name very much. Maybe you could just use a longer name and indent differently (break at the "=" for example), or do a macro around where it is used a lot? I went with rs6000_vector_type -- Nathan Sidwell

Re: [PR 79905] ICE with vector_type

2017-04-06 Thread Segher Boessenkool
Hi! On Thu, Apr 06, 2017 at 02:34:03PM -0400, Nathan Sidwell wrote: > Segher, this fixes a C++ ICE where TYPE_CANONICALs didn't match, but the > types were the same (and non-structural comparison). The underlying > cause is that types with different TYPE_NAME are considered different >

Re: [PR 79905] ICE with vector_type

2017-04-06 Thread Nathan Sidwell
On 04/06/2017 11:13 AM, Bill Schmidt wrote: Nathan's patch regstraps cleanly. I'll try Richard's variant (dropping the if test below) now. As expected, this version passes regstrap as well. Thanks for testing. Segher, this fixes a C++ ICE where TYPE_CANONICALs didn't match, but the

Re: [PR 79905] ICE with vector_type

2017-04-06 Thread Bill Schmidt
> On Apr 6, 2017, at 9:26 AM, Bill Schmidt wrote: > > >> On Apr 6, 2017, at 9:19 AM, Bill Schmidt wrote: >> >> >>> On Apr 6, 2017, at 9:04 AM, Richard Biener >>> wrote: >>> >>> On Thu, Apr 6, 2017 at

Re: [PR 79905] ICE with vector_type

2017-04-06 Thread Bill Schmidt
> On Apr 6, 2017, at 9:19 AM, Bill Schmidt wrote: > > >> On Apr 6, 2017, at 9:04 AM, Richard Biener >> wrote: >> >> On Thu, Apr 6, 2017 at 1:28 PM, Nathan Sidwell wrote: >>> Let's try this one then. > > Nathan's

Re: [PR 79905] ICE with vector_type

2017-04-06 Thread Bill Schmidt
> On Apr 6, 2017, at 9:04 AM, Richard Biener wrote: > > On Thu, Apr 6, 2017 at 1:28 PM, Nathan Sidwell wrote: >> Let's try this one then. Nathan's patch regstraps cleanly. I'll try Richard's variant (dropping the if test below) now. Bill > > I'd

Re: [PR 79905] ICE with vector_type

2017-04-06 Thread Richard Biener
On Thu, Apr 6, 2017 at 1:28 PM, Nathan Sidwell wrote: > Let's try this one then. I'd call this + if (result == TYPE_CANONICAL (result)) +/* Copy so we don't give the canonical type a name. */ +result = build_variant_type_copy (result); premature optimization -- I

Re: [PR 79905] ICE with vector_type

2017-04-06 Thread Nathan Sidwell
Let's try this one then. nathan -- Nathan Sidwell 2017-04-05 Nathan Sidwell PR target/79905 * config/rs6000/rs6000.c (rs6000_vt): New. (rs6000_init_builtins): Use it. testsuite/ * g++.dg/torture/pr79905.C: New. Index: config/rs6000/rs6000.c

Re: [PR 79905] ICE with vector_type

2017-04-06 Thread Richard Biener
On Wed, Apr 5, 2017 at 10:33 PM, Bill Schmidt wrote: > On 4/5/17 9:14 AM, Nathan Sidwell wrote: >> >>> Thanks for the patch! Looks like there are some compile problems. I >>> can fix "resut", but not sure what the intent is for "canonical": >> >> I'm a dumbass. I

Re: [PR 79905] ICE with vector_type

2017-04-05 Thread Bill Schmidt
On 4/5/17 9:14 AM, Nathan Sidwell wrote: > >> Thanks for the patch! Looks like there are some compile problems. I >> can fix "resut", but not sure what the intent is for "canonical": > > I'm a dumbass. I built the x86_64 compiler :( > try this. > > nathan Thanks! Regtest showed that this blows

Re: [PR 79905] ICE with vector_type

2017-04-05 Thread Nathan Sidwell
Thanks for the patch! Looks like there are some compile problems. I can fix "resut", but not sure what the intent is for "canonical": I'm a dumbass. I built the x86_64 compiler :( try this. nathan -- Nathan Sidwell 2017-04-05 Nathan Sidwell PR target/79905 *

Re: [PR 79905] ICE with vector_type

2017-04-05 Thread Bill Schmidt
Hi Nathan, > On Apr 5, 2017, at 8:18 AM, Nathan Sidwell wrote: > > Here's a completed patch. Bill, if you could regression test it, that'd be > great! (feel free to augment the testcase) Thanks for the patch! Looks like there are some compile problems. I can fix "resut",

Re: [PR 79905] ICE with vector_type

2017-04-05 Thread Nathan Sidwell
Here's a completed patch. Bill, if you could regression test it, that'd be great! (feel free to augment the testcase) Richard, rather than copy set_underlying_type's type cloning I added a check in it for error_mark_node as the existing name. If you'd prefer that remain unchanged, I can

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Bill Schmidt
> On Apr 4, 2017, at 1:02 PM, Nathan Sidwell wrote: > > On 04/04/2017 01:40 PM, Bill Schmidt wrote: >> At first blush, the POC patch breaks every test that uses -flto. I'll see >> if I can dig deeper after a bit, >> in case this doesn't make the problem obvious. > > Try this.

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Nathan Sidwell
On 04/04/2017 01:40 PM, Bill Schmidt wrote: At first blush, the POC patch breaks every test that uses -flto. I'll see if I can dig deeper after a bit, in case this doesn't make the problem obvious. Try this. nathan -- Nathan Sidwell Index: c-family/c-common.c

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Bill Schmidt
At first blush, the POC patch breaks every test that uses -flto. I'll see if I can dig deeper after a bit, in case this doesn't make the problem obvious. Thanks, Bill > On Apr 4, 2017, at 9:02 AM, Nathan Sidwell wrote: > > On 04/04/2017 09:57 AM, Bill Schmidt wrote: >> I'll

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Nathan Sidwell
On 04/04/2017 09:57 AM, Bill Schmidt wrote: I'll try the POC patch in a bit (kind of ugly as we have to replicate this for a whole bunch of types, I guess). thanks. Yup, all rs6000's builtins. Wrapping it all in a tree my_builtin_vector (char const *name, tree elt, unsigned num); helper

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Bill Schmidt
I'll try the POC patch in a bit (kind of ugly as we have to replicate this for a whole bunch of types, I guess). Just FYI, I noticed this similar bug report came in today, not sure about the types: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80309 -- Bill Bill Schmidt, Ph.D. GCC for Linux

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Nathan Sidwell
On 04/04/2017 09:00 AM, Richard Biener wrote: tree add_builtin_type (const char *name, tree type) { tree id = get_identifier (name); tree decl = build_decl (BUILTINS_LOCATION, TYPE_DECL, id, type); return lang_hooks.decls.pushdecl (decl); } this seems to miss setting TYPE_NAME (type) =

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Richard Biener
On Tue, Apr 4, 2017 at 1:31 PM, Nathan Sidwell wrote: > On 04/04/2017 04:27 AM, Richard Biener wrote: >> >> On Mon, Apr 3, 2017 at 9:03 PM, Nathan Sidwell wrote: > > >>> However, as you can see there's already a get-out for COMPLEX_TYPE, and I >>> think the same

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Nathan Sidwell
On 04/04/2017 04:27 AM, Richard Biener wrote: On Mon, Apr 3, 2017 at 9:03 PM, Nathan Sidwell wrote: However, as you can see there's already a get-out for COMPLEX_TYPE, and I think the same is needed for VECTOR_TYPE. Hmm, but that is essentially a hack given that

Re: [PR 79905] ICE with vector_type

2017-04-04 Thread Richard Biener
On Mon, Apr 3, 2017 at 9:03 PM, Nathan Sidwell wrote: > Bill, > can you give this patch a spin please? I've smoke tested it on a ppc64le > x-compiler, but don't have one to run executables. regression testing on an > x86_64-linux system is ok. > > The DEPENDENT_TYPE_VALID_P thing

[PR 79905] ICE with vector_type

2017-04-03 Thread Nathan Sidwell
Bill, can you give this patch a spin please? I've smoke tested it on a ppc64le x-compiler, but don't have one to run executables. regression testing on an x86_64-linux system is ok. The DEPENDENT_TYPE_VALID_P thing is a red herring. It is the canonical type table's equal function