Re: Fwd: libcpp/C FE source range patch committed (r230331).

2015-11-24 Thread Marek Polacek
On Tue, Nov 24, 2015 at 11:50:21AM +, Jay Foad wrote: > I see now that it's already reported as PR c/68473. Ooops, sorry, I knew about that one, but thought that's a different problem. Marek

Re: Fwd: libcpp/C FE source range patch committed (r230331).

2015-11-24 Thread Marek Polacek
On Tue, Nov 24, 2015 at 11:24:38AM +, Jay Foad wrote: > r230331 also seems to be causing this on x86_64-pc-linux-gnu: > > $ cat x.c > #define P(b) b&&4 > int a[]=0; > int f() { X||P(d); } > $ ~/gcc/build/gcc/cc1 -quiet -Wall x.c > [...] > x.c:3:1: internal compiler error: in contains_point,

Re: Fwd: libcpp/C FE source range patch committed (r230331).

2015-11-24 Thread Jay Foad
On 24 November 2015 at 11:34, Marek Polacek wrote: > On Tue, Nov 24, 2015 at 11:24:38AM +, Jay Foad wrote: >> r230331 also seems to be causing this on x86_64-pc-linux-gnu: >> >> $ cat x.c >> #define P(b) b&&4 >> int a[]=0; >> int f() { X||P(d); } >> $ ~/gcc/build/gcc/cc1

Fwd: libcpp/C FE source range patch committed (r230331).

2015-11-24 Thread Jay Foad
(Resending as plain text. Sorry for the HTML!) On 14 November 2015 at 14:50, David Edelsohn wrote: > > This patch causes numerous new testsuite failure on AIX caused by the > compiler crashing during compilation, e.g. r230331 also seems to be causing this on

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-21 Thread David Edelsohn
On Tue, Nov 17, 2015 at 3:12 PM, David Malcolm wrote: > On Tue, 2015-11-17 at 16:24 +0100, Bernd Schmidt wrote: >> On 11/17/2015 04:13 PM, David Malcolm wrote: >> > On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: >> >> >> >> Should c_expr perhaps acquire a constructor

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-21 Thread David Malcolm
On Sat, 2015-11-21 at 13:54 -0500, David Edelsohn wrote: > On Tue, Nov 17, 2015 at 3:12 PM, David Malcolm wrote: > > On Tue, 2015-11-17 at 16:24 +0100, Bernd Schmidt wrote: > >> On 11/17/2015 04:13 PM, David Malcolm wrote: > >> > On Mon, 2015-11-16 at 22:34 +0100, Bernd

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-21 Thread David Edelsohn
On Sat, Nov 21, 2015 at 3:00 PM, David Malcolm wrote: > On Sat, 2015-11-21 at 13:54 -0500, David Edelsohn wrote: >> On Tue, Nov 17, 2015 at 3:12 PM, David Malcolm wrote: >> > On Tue, 2015-11-17 at 16:24 +0100, Bernd Schmidt wrote: >> >> On 11/17/2015

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-17 Thread David Malcolm
On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: > On 11/16/2015 09:50 PM, David Malcolm wrote: > > The root cause is uninitialized data. Specifically, the C parser's > > struct c_expr gained a "src_range" field, and it turns out there are a > > few places where I wasn't initializing this

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-17 Thread Bernd Schmidt
On 11/17/2015 04:13 PM, David Malcolm wrote: On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: Should c_expr perhaps acquire a constructor so that this problem is avoided in the future? The whole thing seems somewhat error-prone. I agree that it's error prone, and the ctor approach is

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-17 Thread David Malcolm
On Tue, 2015-11-17 at 16:24 +0100, Bernd Schmidt wrote: > On 11/17/2015 04:13 PM, David Malcolm wrote: > > On Mon, 2015-11-16 at 22:34 +0100, Bernd Schmidt wrote: > >> > >> Should c_expr perhaps acquire a constructor so that this problem is > >> avoided in the future? The whole thing seems

Re: [PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-16 Thread Bernd Schmidt
On 11/16/2015 09:50 PM, David Malcolm wrote: The root cause is uninitialized data. Specifically, the C parser's struct c_expr gained a "src_range" field, and it turns out there are a few places where I wasn't initializing this when returning c_expr instances on the stack, and in some cases the

[PATCH] Fix uninitialized src_range within c_expr (Re: libcpp/C FE source range patch committed (r230331))

2015-11-16 Thread David Malcolm
On Sat, 2015-11-14 at 23:32 -0500, David Malcolm wrote: > On Sat, 2015-11-14 at 09:50 -0500, David Edelsohn wrote: > > This patch causes numerous new testsuite failure on AIX caused by the > > compiler crashing during compilation, e.g. > > > > gcc.c-torture/execute/20020206-1.c > > > > in GCC

Re: libcpp/C FE source range patch committed (r230331).

2015-11-14 Thread David Malcolm
On Sat, 2015-11-14 at 09:50 -0500, David Edelsohn wrote: > This patch causes numerous new testsuite failure on AIX caused by the > compiler crashing during compilation, e.g. > > gcc.c-torture/execute/20020206-1.c > > in GCC libcpp > > 991 linemap_assert (line >=

Re: libcpp/C FE source range patch committed (r230331).

2015-11-14 Thread David Edelsohn
This patch causes numerous new testsuite failure on AIX caused by the compiler crashing during compilation, e.g. gcc.c-torture/execute/20020206-1.c in GCC libcpp 991 linemap_assert (line >= LINEMAPS_MACRO_LOWEST_LOCATION (set)); (gdb) where #0 _Z11fancy_abortPKciS0_ (

libcpp/C FE source range patch committed (r230331).

2015-11-13 Thread David Malcolm
On Mon, 2015-11-02 at 14:14 -0500, David Malcolm wrote: > On Fri, 2015-10-30 at 00:15 -0600, Jeff Law wrote: > > On 10/23/2015 02:41 PM, David Malcolm wrote: > > > As in the previous version of this patch > > > "Implement tree expression tracking in C FE (v2)" > > > the patch now captures ranges