Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Teresa Johnson
Here is the new patch. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk? Thanks, Teresa 2014-11-13tejohn...@google.com gcc: PR tree-optimization/63841 * tree.c (initializer_zerop): A constructor with no elements does not zero initialize.

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Richard Biener
On Thu, Nov 13, 2014 at 3:20 PM, Teresa Johnson tejohn...@google.com wrote: Here is the new patch. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk? Ok for trunk and branches. Thanks, Richard. Thanks, Teresa 2014-11-13tejohn...@google.com gcc: PR

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Richard Biener
On Thu, Nov 13, 2014 at 3:32 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Nov 13, 2014 at 3:20 PM, Teresa Johnson tejohn...@google.com wrote: Here is the new patch. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk? Ok for trunk and branches. Err - please fix

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Teresa Johnson
On Thu, Nov 13, 2014 at 6:32 AM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Nov 13, 2014 at 3:32 PM, Richard Biener richard.guent...@gmail.com wrote: On Thu, Nov 13, 2014 at 3:20 PM, Teresa Johnson tejohn...@google.com wrote: Here is the new patch. Bootstrapped and tested on

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Jakub Jelinek
On Thu, Nov 13, 2014 at 06:20:16AM -0800, Teresa Johnson wrote: Here is the new patch. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk? Thanks, Teresa 2014-11-13tejohn...@google.com gcc: PR tree-optimization/63841 * tree.c (initializer_zerop): A

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Teresa Johnson
On Thu, Nov 13, 2014 at 6:36 AM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Nov 13, 2014 at 06:20:16AM -0800, Teresa Johnson wrote: Here is the new patch. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk? Thanks, Teresa 2014-11-13tejohn...@google.com gcc:

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Richard Biener
On Thu, Nov 13, 2014 at 3:46 PM, Teresa Johnson tejohn...@google.com wrote: On Thu, Nov 13, 2014 at 6:36 AM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Nov 13, 2014 at 06:20:16AM -0800, Teresa Johnson wrote: Here is the new patch. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Jakub Jelinek
On Thu, Nov 13, 2014 at 06:46:23AM -0800, Teresa Johnson wrote: --- tree.c (revision 217190) +++ tree.c (working copy) @@ -10330,6 +10330,8 @@ initializer_zerop (const_tree init) { unsigned HOST_WIDE_INT idx; +if (TREE_CLOBBER_P (init)) +

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Teresa Johnson
On Thu, Nov 13, 2014 at 7:12 AM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Nov 13, 2014 at 06:46:23AM -0800, Teresa Johnson wrote: --- tree.c (revision 217190) +++ tree.c (working copy) @@ -10330,6 +10330,8 @@ initializer_zerop (const_tree init) { unsigned

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Teresa Johnson
On Thu, Nov 13, 2014 at 7:39 AM, Teresa Johnson tejohn...@google.com wrote: On Thu, Nov 13, 2014 at 7:12 AM, Jakub Jelinek ja...@redhat.com wrote: And for release branches I'd really prefer tree-ssa-strlen.c change. Ok, I started testing the initializer_zerop change on the 4_9 branch, will

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Jakub Jelinek
On Thu, Nov 13, 2014 at 12:51:05PM -0800, Teresa Johnson wrote: On Thu, Nov 13, 2014 at 7:39 AM, Teresa Johnson tejohn...@google.com wrote: On Thu, Nov 13, 2014 at 7:12 AM, Jakub Jelinek ja...@redhat.com wrote: And for release branches I'd really prefer tree-ssa-strlen.c change. Ok, I

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Teresa Johnson
On Thu, Nov 13, 2014 at 12:55 PM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Nov 13, 2014 at 12:51:05PM -0800, Teresa Johnson wrote: On Thu, Nov 13, 2014 at 7:39 AM, Teresa Johnson tejohn...@google.com wrote: On Thu, Nov 13, 2014 at 7:12 AM, Jakub Jelinek ja...@redhat.com wrote: And for

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Jakub Jelinek
On Thu, Nov 13, 2014 at 01:33:07PM -0800, Teresa Johnson wrote: Supposedly the printfs should have been removed and the #include cstdio isn't needed then either. No need to clutter the test output and log files. On the other side, tests should abort (); or __builtin_abort (); on failure,

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-13 Thread Teresa Johnson
On Thu, Nov 13, 2014 at 1:45 PM, Jakub Jelinek ja...@redhat.com wrote: On Thu, Nov 13, 2014 at 01:33:07PM -0800, Teresa Johnson wrote: Supposedly the printfs should have been removed and the #include cstdio isn't needed then either. No need to clutter the test output and log files. On

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-12 Thread Xinliang David Li
missing test case? David On Wed, Nov 12, 2014 at 2:13 PM, Teresa Johnson tejohn...@google.com wrote: This patch fixes an issue where tree-strlen was incorrectly removing a store of 0 into a string because it thought a prior CLOBBER (which is an empty constructor with no elements) was

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-12 Thread Teresa Johnson
Added testcase. Here is the new patch: 2014-11-12tejohn...@google.com gcc: PR tree-optimization/63841 * tree.c (initializer_zerop): A constructor with no elements does not zero initialize. gcc/testsuite: * g++.dg/tree-ssa/pr63841.C: New test. Index: tree.c

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-12 Thread Andrew Pinski
On Wed, Nov 12, 2014 at 9:25 PM, Teresa Johnson tejohn...@google.com wrote: Added testcase. Here is the new patch: 2014-11-12tejohn...@google.com gcc: PR tree-optimization/63841 * tree.c (initializer_zerop): A constructor with no elements does not zero

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-12 Thread Teresa Johnson
On Wed, Nov 12, 2014 at 9:30 PM, Andrew Pinski pins...@gmail.com wrote: On Wed, Nov 12, 2014 at 9:25 PM, Teresa Johnson tejohn...@google.com wrote: Added testcase. Here is the new patch: 2014-11-12tejohn...@google.com gcc: PR tree-optimization/63841 * tree.c

Re: [PATCH] Fix PR/63841: empty constructor doesn't zero-initialize

2014-11-12 Thread Andrew Pinski
On Wed, Nov 12, 2014 at 9:38 PM, Teresa Johnson tejohn...@google.com wrote: On Wed, Nov 12, 2014 at 9:30 PM, Andrew Pinski pins...@gmail.com wrote: On Wed, Nov 12, 2014 at 9:25 PM, Teresa Johnson tejohn...@google.com wrote: Added testcase. Here is the new patch: 2014-11-12