Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-07-08 Thread Mike Stump
On Jul 8, 2014, at 3:12 PM, Dominique Dhumieres wrote: >> diff --git gcc/testsuite/c-c++-common/pr60226.c >> gcc/testsuite/c-c++-common/pr60226.c > > The test fails on x86_64-apple-darwin13 with > > FAIL: c-c++-common/pr60226.c -std=gnu++98 (test for excess errors) > Excess errors: > /opt/gcc/

Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-07-08 Thread Dominique Dhumieres
> ... > diff --git gcc/testsuite/c-c++-common/pr60226.c > gcc/testsuite/c-c++-common/pr60226.c > ... The test fails on x86_64-apple-darwin13 with FAIL: c-c++-common/pr60226.c -std=gnu++98 (test for excess errors) Excess errors: /opt/gcc/work/gcc/testsuite/c-c++-common/pr60226.c:6:7: error: alig

Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-07-07 Thread Jeff Law
On 07/03/14 04:18, Marek Polacek wrote: On Mon, Jun 30, 2014 at 03:40:18PM -0700, Mike Stump wrote: I glanced at it: (gdb) p/x TYPE_ALIGN (type) $1 = 2147483648 (gdb) p/x TYPE_ALIGN (type) $2 = 0x8000 The callee is int, the caller uses unsigned int. The assert I see is because the routin

Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-07-03 Thread Marek Polacek
On Mon, Jun 30, 2014 at 03:40:18PM -0700, Mike Stump wrote: > I glanced at it: > > (gdb) p/x TYPE_ALIGN (type) > $1 = 2147483648 > (gdb) p/x TYPE_ALIGN (type) > $2 = 0x8000 > > The callee is int, the caller uses unsigned int. The assert I see is because > the routines are not type correct:

Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-07-03 Thread Marek Polacek
On Mon, Jun 30, 2014 at 01:50:12PM -0600, Jeff Law wrote: > On 03/04/14 09:40, Marek Polacek wrote: > >This should fix ICE on insane alignment. Normally, check_user_alignment > >detects e.g. alignment 1 << 32, but not 1 << 28. However, record_align > >is in bits, so it's actually 8 * (1 << 28) an

Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-06-30 Thread Mike Stump
On Jun 30, 2014, at 3:40 PM, Mike Stump wrote: >> Is this still applicable after the wide-int changes? I haven't looked >> closely. Oops, forgot to state what I wanted to state… Yes, it still aborts post wide-int…

Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-06-30 Thread Mike Stump
On Jun 30, 2014, at 12:50 PM, Jeff Law wrote: > On 03/04/14 09:40, Marek Polacek wrote: >> This should fix ICE on insane alignment. Normally, check_user_alignment >> detects e.g. alignment 1 << 32, but not 1 << 28. However, record_align >> is in bits, so it's actually 8 * (1 << 28) and that's gr

Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-06-30 Thread Jeff Law
On 03/04/14 09:40, Marek Polacek wrote: This should fix ICE on insane alignment. Normally, check_user_alignment detects e.g. alignment 1 << 32, but not 1 << 28. However, record_align is in bits, so it's actually 8 * (1 << 28) and that's greater than INT_MAX. This patch rejects such code. In t

Re: [PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-03-13 Thread Marek Polacek
Ping. On Tue, Mar 04, 2014 at 05:40:29PM +0100, Marek Polacek wrote: > This should fix ICE on insane alignment. Normally, check_user_alignment > detects e.g. alignment 1 << 32, but not 1 << 28. However, record_align > is in bits, so it's actually 8 * (1 << 28) and that's greater than > INT_MAX.

[PATCH] Don't ICE with huge alignment (PR middle-end/60226)

2014-03-04 Thread Marek Polacek
This should fix ICE on insane alignment. Normally, check_user_alignment detects e.g. alignment 1 << 32, but not 1 << 28. However, record_align is in bits, so it's actually 8 * (1 << 28) and that's greater than INT_MAX. This patch rejects such code. In the middle hunk, we should give up when an