Re: [PATCH] Avoid infinite loop with duplicate anonymous union fields

2018-08-01 Thread Bogdan Harjoc
On Wed, Aug 1, 2018 at 1:20 AM, Joseph Myers wrote: > On Wed, 1 Aug 2018, Bogdan Harjoc wrote: > >> So array[0] < component < array[2], which loops (I removed the gdb p >> commands for field_array[1] and so on). > > Is the key thing here that you end up with

Re: [PATCH] Avoid infinite loop with duplicate anonymous union fields

2018-07-31 Thread Bogdan Harjoc
fff6300c30 (gdb) p field_array[0].decl_minimal.name $1 = (tree) 0x76300c30 $1 = (tree) 0x0 $2 = (tree) 0x76300050 $3 = (tree) 0x763000a0... Thanks for the guidance, Bogdan On Tue, Jul 31, 2018 at 10:43 PM, Joseph Myers wrote: > On Tue, 31 Jul 2018, Bogdan Harjoc wrote: >

Re: [PATCH] Avoid infinite loop with duplicate anonymous union fields

2018-07-31 Thread Bogdan Harjoc
and as it only reproduces without -save-temps, it's not clear how to write a testcase for this one. On Fri, Jul 27, 2018 at 8:01 PM, Joseph Myers wrote: > On Fri, 27 Jul 2018, Bogdan Harjoc wrote: > >> If a struct contains an anonymous union and both have a field with the

[PATCH] Avoid infinite loop with duplicate anonymous union fields

2018-07-27 Thread Bogdan Harjoc
(this patch is already uploaded to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86690 ) If a struct contains an anonymous union and both have a field with the same name, detect_field_duplicates_hash() will replace one of them with NULL. If compilation doesn't stop immediately, it may later call