[GOOGLE] Adjust profile for AutoFDO

2014-01-24 Thread Dehao Chen
This patch fixes performance regression for AutoFDO. When the entry block count is 0, which is quite possible in AutoFDO, it can still make right optimization decision. Bootstrapped passed regression test and performance test (improve 0.5% on average). OK for google-4_8? Thanks, Dehao Index: gcc

[jit] Add test case for a client that adds nothing to a gcc_jit_context

2014-01-24 Thread David Malcolm
Committed to dmalcolm/jit: gcc/testsuite/ * jit.dg/test-empty.c: New test case: a client that adds nothing to a gcc_jit_context. --- gcc/testsuite/ChangeLog.jit | 4 gcc/testsuite/jit.dg/test-empty.c | 20 2 files changed, 24 insertions(+) create

Re: [PATCH, committed] Replace flag_enable_cilkplus with flag_cilkplus

2014-01-24 Thread Aldy Hernandez
On 01/24/14 14:57, Iyer, Balaji V wrote: Hello Jakub and Aldy, As you both requested, this patch will replace flag_enable_cilkplus with flag_cilkplus. I have committed this patch since the change is a small/obvious one. Please let me know if you like me to change anything. This is fine. Thank

Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals

2014-01-24 Thread Markus Trippelsdorf
On 2014.01.25 at 00:02 +0100, Markus Trippelsdorf wrote: > On 2014.01.24 at 17:09 +0100, Dodji Seketeli wrote: > > Jakub Jelinek writes: > > > > > On Fri, Jan 24, 2014 at 04:40:52PM +0100, Dodji Seketeli wrote: > > >> > The patch causes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59935 . > > >> >

[C++ RFC/Patch] PR 58561

2014-01-24 Thread Paolo Carlini
Hi, in this bug we ICE in dwarf2out.c:is_base_type with -g, because it doesn't know how to handle the TEMPLATE_TYPE_PARM coming from the C++ front-end and representing 'auto' in this kind of C++1y code. That it shouldn't ICE and return 0 instead I'm pretty sure, I'm less sure about the next

Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals

2014-01-24 Thread Markus Trippelsdorf
On 2014.01.24 at 17:09 +0100, Dodji Seketeli wrote: > Jakub Jelinek writes: > > > On Fri, Jan 24, 2014 at 04:40:52PM +0100, Dodji Seketeli wrote: > >> > The patch causes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59935 . > >> > The follow-up patch (fp == NULL check) doesn't help. > >> > >> I am

Re: [PATCH] add __attribute__ ((designated_init))

2014-01-24 Thread Tom Tromey
Joseph> Is there a reason someone using the attribute might not want the Joseph> warning? That is, why isn't -Wdesignated-init enabled by Joseph> default, given that it's only relevant to people using an Joseph> attribute whose sole function relates to the warning? In making this change, I also r

[PATCH, committed] Replace flag_enable_cilkplus with flag_cilkplus

2014-01-24 Thread Iyer, Balaji V
Hello Jakub and Aldy, As you both requested, this patch will replace flag_enable_cilkplus with flag_cilkplus. I have committed this patch since the change is a small/obvious one. Please let me know if you like me to change anything. Here are the ChangeLog entries: gcc/ChangeLog +2014-01

Re: [PATCH] Don't warn with -Waggressive-loop-optimizations multiple times about the same loop (PR middle-end/59561)

2014-01-24 Thread Jeff Law
On 01/24/14 14:14, Jakub Jelinek wrote: Hi! When a loop is duplicated, inlined etc. and we've already warned about undefined behavior in it, it is undesirable to warn again. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2014-01-22 Jakub Jelinek PR middle-end/

Go patch committed: Use backend interface for unary expressions

2014-01-24 Thread Ian Lance Taylor
This patch from Chris Manghane changes the Go frontend to use the backend interface for unary expressions. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian 2014-01-24 Chris Manghane * go-gcc.cc (Gcc_backend::unary_expression): New function.

Re: Disable accumulate-outgoing-args for Generic and Buldozers

2014-01-24 Thread Jan Hubicka
> On Wed, Jan 01, 2014 at 03:30:04PM +0100, Jan Hubicka wrote: > > * config/i38/x86-tune.def: Disable X86_TUNE_ACCUMULATE_OUTGOING_ARGS > > for generic and recent AMD chips > > Index: config/i386/x86-tune.def > > === > > --- co

Re: [PATCH] Improve dumping CALL_INSN_FUNCTION_USAGE

2014-01-24 Thread Eric Botcazou
> This is something that has annyoed me for quite some time, but never got > around to do anything about it. The EXPR_LIST mode in > CALL_INSN_FUNCTION_USAGE never means the various REG_DEAD/REG_CFA* etc. > note names, always normal mode, so e.g. when one is looking for REG_CFA* > notes, the calls

Re: [PATCH] Set correct probability for ORDER/UNORDER jumps

2014-01-24 Thread Dehao Chen
Thanks, test updated: Index: gcc/testsuite/gcc.dg/predict-8.c === --- gcc/testsuite/gcc.dg/predict-8.c (revision 0) +++ gcc/testsuite/gcc.dg/predict-8.c (revision 0) @@ -0,0 +1,12 @@ +/* { dg-do compile { target { i?86-*-* x86_64-*-*

[PATCH] Improve dumping CALL_INSN_FUNCTION_USAGE

2014-01-24 Thread Jakub Jelinek
Hi! This is something that has annyoed me for quite some time, but never got around to do anything about it. The EXPR_LIST mode in CALL_INSN_FUNCTION_USAGE never means the various REG_DEAD/REG_CFA* etc. note names, always normal mode, so e.g. when one is looking for REG_CFA* notes, the calls can

[PATCH] Don't ignore write/write DDR_REVERSED_P dependencies (PR tree-optimization/59594)

2014-01-24 Thread Jakub Jelinek
Hi! I admit I fully don't understand why exactly, but my experimentation so far showed that for read/write and write/read ddrs it is ok and desirable to ignore the dist > 0 && DDR_REVERSED_P (ddr) cases, but for write/write ddrs it is undesirable. See the PR for further tests, perhaps I could tur

[PATCH] Don't warn with -Waggressive-loop-optimizations multiple times about the same loop (PR middle-end/59561)

2014-01-24 Thread Jakub Jelinek
Hi! When a loop is duplicated, inlined etc. and we've already warned about undefined behavior in it, it is undesirable to warn again. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2014-01-22 Jakub Jelinek PR middle-end/59561 * cfgloopmanip.c (copy_loop_

Re: Disable accumulate-outgoing-args for Generic and Buldozers

2014-01-24 Thread Jakub Jelinek
On Wed, Jan 01, 2014 at 03:30:04PM +0100, Jan Hubicka wrote: > * config/i38/x86-tune.def: Disable X86_TUNE_ACCUMULATE_OUTGOING_ARGS > for generic and recent AMD chips > Index: config/i386/x86-tune.def > === > --- config/i38

Re: [PATCH 2/6] [GOMP4] OpenACC 1.0+ support in fortran front-end

2014-01-24 Thread Thomas Schwinge
Hi! Regarding my comments, please keep in mind that I don't have a lot of Fortran experience; neither as a user nor as an implementor ;-) in the GCC front end, so don't hesitate to tell me if I'm misunderstanding something. As I suggested, it may make sense to CC Fortran front end maintainers for

Re: Handle XOR in canonicalize_condition

2014-01-24 Thread Jeff Law
On 01/24/14 01:24, Richard Sandiford wrote: Richard Sandiford writes: The other problem is related to the way that MIPS16 tests for equality. Conditional branches test register $24, and the only instructions that set $24 are MOVE and CMP(I), which is actually an XOR rather than a subtraction.

RE: [PATCH] _Cilk_for for C and C++

2014-01-24 Thread Iyer, Balaji V
> -Original Message- > From: Jakub Jelinek [mailto:ja...@redhat.com] > Sent: Friday, January 24, 2014 2:42 PM > To: Iyer, Balaji V > Cc: Jason Merrill; 'Jeff Law'; 'Aldy Hernandez'; 'gcc-patches@gcc.gnu.org'; > 'r...@redhat.com' > Subject: Re: [PATCH] _Cilk_for for C and C++ > > On Thu,

Re: [PATCH 1/6] [GOMP4] OpenACC 1.0+ support in fortran front-end

2014-01-24 Thread Thomas Schwinge
Hi! Regarding my comments, please keep in mind that I don't have a lot of Fortran experience; neither as a user nor as an implementor ;-) in the GCC front end, so don't hesitate to tell me if I'm misunderstanding something. As I suggested, it may make sense to CC Fortran front end maintainers for

Re: [RFA][PATCH] Fix tree-optimization/59919

2014-01-24 Thread Jakub Jelinek
On Fri, Jan 24, 2014 at 01:22:17PM -0700, Jeff Law wrote: > On 01/24/14 03:52, Jakub Jelinek wrote: > > > >I'd say this belongs into infer_value_range instead. > Here we go with that variant: > > OK for the trunk? Yes, thanks. > --- a/gcc/ChangeLog > +++ b/gcc/ChangeLog > @@ -1,3 +1,9 @@ > +2014-

Re: PR libstdc++/59529, 59530,59531 Various string_view bugs.

2014-01-24 Thread Paolo Carlini
Ed Smith-Rowland <3dw...@verizon.net> ha scritto: >As committed: > >Same patch as discussed before all the holidays. > >Built and tested x86_64-linux. Thanks. Please remember to also close the bugs. Paolo.

Re: [RFA][PATCH] Fix tree-optimization/59919

2014-01-24 Thread Jeff Law
On 01/24/14 03:52, Jakub Jelinek wrote: I'd say this belongs into infer_value_range instead. Here we go with that variant: OK for the trunk? jeff diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2998c72..3b1abbc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-01-23 Jeff

PR libstdc++/59529, 59530,59531 Various string_view bugs.

2014-01-24 Thread Ed Smith-Rowland
As committed: Same patch as discussed before all the holidays. Built and tested x86_64-linux. 2014-01-24 Ed Smith-Rowland <3dw...@verizon.net> Peter A. Bigot PR libstdc++/59529 * include/experimental/string_view (basic_string_view(const _CharT*, size_type

[jit] Support floating-point division; add test-quadratic.c

2014-01-24 Thread David Malcolm
Committed to branch dmalcolm/jit: Add testcase test-quadratic.c, written to achieve test coverage of gcc_jit_rvalue_access_field - with this commit, the test suite has at least one call to every public symbol in the API. In the process, I found that GCC_JIT_BINARY_OP_DIVIDE on floating-point type

[patch] fix libstdc++/59548

2014-01-24 Thread Jonathan Wakely
The debug-mode container base classes need copy constructors that zero-init their members rather than copy them from the source. _Safe_unordered_container_base also needs its move constructor to be non-throwing to fix some FAILs for the PR 55043 tests. Tested x86_64-linux, normal and debug modes

Re: [PATCH] _Cilk_for for C and C++

2014-01-24 Thread Jakub Jelinek
On Thu, Jan 23, 2014 at 04:38:53PM +, Iyer, Balaji V wrote: > This is how I started to think of it at first, but then when I thought > about it ... in _Cilk_for unlike the #pragma simd's for, the for statement - > not the body - (e.g. "_Cilk_for (int ii = 0; ii < 10; ii++") doesn't real

Re: [PATCH] Set correct probability for ORDER/UNORDER jumps

2014-01-24 Thread H.J. Lu
On Fri, Jan 24, 2014 at 10:57 AM, Jakub Jelinek wrote: > On Fri, Jan 24, 2014 at 10:20:53AM -0800, Dehao Chen wrote: >> --- gcc/testsuite/gcc.dg/predict-8.c (revision 0) >> +++ gcc/testsuite/gcc.dg/predict-8.c (revision 0) >> @@ -0,0 +1,12 @@ >> +/* { dg-do compile { target { x86_64-*-* } } } */ >

Re: [PATCH 4/6] [GOMP4] OpenACC 1.0+ support in fortran front-end

2014-01-24 Thread Thomas Schwinge
Hi! On Thu, 23 Jan 2014 22:04:45 +0400, Ilmir Usmanov wrote: > Subject: [PATCH 4/6] OpenACC GENERIC nodes > --- a/gcc/gimplify.c > +++ b/gcc/gimplify.c > @@ -7846,6 +7907,18 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, > gimple_seq *post_p, > ret = GS_ALL_DONE; > break; >

C++ PATCH for c++/58550 (ICE on invalid 'auto' with LTO)

2014-01-24 Thread Jason Merrill
Here, we were just giving a pedwarn about the invalid-in-C++11 declaration of 'auto foo()' and then not giving the C++1y error about using a function with an undeduced return type in the initializer of fp, leading to confusion in LTO. The simplest fix is to raise the pedwarn to a hard error.

Re: C++ PATCH for c++/59659 (compile-hog with list-initialization of member array)

2014-01-24 Thread Jason Merrill
On 01/24/2014 12:53 PM, Jakub Jelinek wrote: Wouldn't my patch then be useful short-term partial fix for 4.9 and we could revert it when RANGE_EXPR are committed again to 5.0? Your patch helps your testcase, but not the original testcase or my reduced testcase, so I'm not sure it's worth the r

Re: [PATCH] Set correct probability for ORDER/UNORDER jumps

2014-01-24 Thread Jakub Jelinek
On Fri, Jan 24, 2014 at 10:20:53AM -0800, Dehao Chen wrote: > --- gcc/testsuite/gcc.dg/predict-8.c (revision 0) > +++ gcc/testsuite/gcc.dg/predict-8.c (revision 0) > @@ -0,0 +1,12 @@ > +/* { dg-do compile { target { x86_64-*-* } } } */ If you want it for x86_64 64-bit, then /* { dg-do compile { ta

Re: [PATCH] Set correct probability for ORDER/UNORDER jumps

2014-01-24 Thread Dehao Chen
A new test is added: gcc/testsuite/ChangeLog: 2014-01-24 Dehao Chen * gcc.dg/predict-8.c: New test. Index: gcc/testsuite/gcc.dg/predict-8.c === --- gcc/testsuite/gcc.dg/predict-8.c (revision 0) +++ gcc/testsuite/gcc.dg/p

Re: [PATCH] [GOMP4] OpenACC 1.0+ support in fortran front-end

2014-01-24 Thread Thomas Schwinge
Hi! On Thu, 23 Jan 2014 22:01:19 +0400, Ilmir Usmanov wrote: > Jakub, could you review these patches, if they are OK to gomp-4_0-branch? > > Thomas, please, have a look whether this implementation applies current > OpenACC support style. So, in context of

Re: C++ PATCH for c++/59659 (compile-hog with list-initialization of member array)

2014-01-24 Thread Jakub Jelinek
On Fri, Jan 24, 2014 at 11:47:17AM -0500, Jason Merrill wrote: > On 01/15/2014 02:08 PM, Jason Merrill wrote: > >1) Because atomics do have user-provided constructors, we were going > >down the constructor path and not realizing that it just gave us > >zero-initialization. Fixed by calling maybe_c

Re: Two build != host fixes

2014-01-24 Thread Jeff Law
On 01/23/14 16:02, Alan Modra wrote: On Wed, Jan 22, 2014 at 09:21:46PM -0700, Jeff Law wrote: * Makefile.in (BUILD_CPPFLAGS): Do not use ALL_CPPFLAGS. * configure.ac : Define GENERATOR_FILE. Comment. Use CXX_FOR_BUILD, CXXFLAGS_FOR_BUILD and LD_FOR_BUILD too.

Re: [PATCH] add __attribute__ ((designated_init))

2014-01-24 Thread Tom Tromey
Joseph> I think that's best (generally, %<%> or %q with anything quoting Joseph> a source-code construct - anything that would go in a Joseph> fixed-width font in documentation - "struct" is such a case, the Joseph> English word is "structure"). Makes sense. I'll fix it all up. Joseph> Is there

[PATCH, ARM] Suppress Redundant Flag Setting for Cortex-A15

2014-01-24 Thread Ian Bolton
Hi there! An existing optimisation for Thumb-2 converts t32 encodings to t16 encodings to reduce codesize, at the expense of causing redundant flag setting for ADD, AND, etc. This redundant flag setting can have negative performance impact on cortex-a15. This patch introduces two new tuning opti

Re: [PATCH] add __attribute__ ((designated_init))

2014-01-24 Thread Joseph S. Myers
On Thu, 23 Jan 2014, Tom Tromey wrote: > In this error, should I use "%" rather than just plain "struct" > as well? I think that's best (generally, %<%> or %q with anything quoting a source-code construct - anything that would go in a fixed-width font in documentation - "struct" is such a case,

[jit] Use access methods for context options

2014-01-24 Thread David Malcolm
Committed to dmalcolm/jit: gcc/jit/ * internal-api.h (gcc::jit::context::get_str_option): New access method. (gcc::jit::context::get_int_option): Likewise. * internal-api.c (gcc::jit::context::~context): Use access methods for options, rather than direct fi

Re: [C PATCH] Improve locinfo a bit (PR c/59846)

2014-01-24 Thread Marek Polacek
On Fri, Jan 24, 2014 at 04:06:50PM +0100, Andreas Schwab wrote: > FAIL: gcc.dg/pr59846.c (test for warnings, line 8) > FAIL: gcc.dg/pr59846.c (test for warnings, line 14) > FAIL: gcc.dg/pr59846.c (test for excess errors) > Excess errors: > /daten/aranym/gcc/gcc-20140124/gcc/t

Re: [AArch64] fix big.LITTLE spec rewriting

2014-01-24 Thread Marcus Shawcroft
On 21 January 2014 10:48, James Greenhalgh wrote: > 2014-01-21 James Greenhalgh > > * common/config/aarch64/aarch64-common.c > (aarch64_rewrite_mcpu): Handle multiple names. > * config/aarch64/aarch64.h > (BIG_LITTLE_SPEC): Do not discard mcpu switches. OK /Mar

Re: [RFA][PATCH] Fix tree-optimization/59919

2014-01-24 Thread Jeff Law
On 01/24/14 09:41, Jakub Jelinek wrote: The only downside is we lose the ability to backward propagate through a typecast which feeds an argument in such a call. But that's probably not a big deal. I couldn't actually reproduce any backwards propagation, since now all pointer casts are usele

Re: C++ PATCH for c++/59659 (compile-hog with list-initialization of member array)

2014-01-24 Thread Jason Merrill
On 01/15/2014 02:08 PM, Jason Merrill wrote: 1) Because atomics do have user-provided constructors, we were going down the constructor path and not realizing that it just gave us zero-initialization. Fixed by calling maybe_constant_value and avoiding adding extra zero-initialization to the end o

Re: [RFA][PATCH] Fix tree-optimization/59919

2014-01-24 Thread Jakub Jelinek
On Fri, Jan 24, 2014 at 09:35:10AM -0700, Jeff Law wrote: > On 01/24/14 03:52, Jakub Jelinek wrote: > >On Thu, Jan 23, 2014 at 02:22:35PM -0700, Jeff Law wrote: > >>--- a/gcc/tree-vrp.c > >>+++ b/gcc/tree-vrp.c > >>@@ -5891,8 +5891,13 @@ find_assert_locations_1 (basic_block bb, sbitmap > >>live) >

Re: [RFA][PATCH] Fix tree-optimization/59919

2014-01-24 Thread Jeff Law
On 01/24/14 03:52, Jakub Jelinek wrote: On Thu, Jan 23, 2014 at 02:22:35PM -0700, Jeff Law wrote: --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -5891,8 +5891,13 @@ find_assert_locations_1 (basic_block bb, sbitmap live) } } - register_new_assert_for

Re: lto-plugin: mismatch between ld's architecture and GCC's configure --host

2014-01-24 Thread H.J. Lu
On Fri, Jan 24, 2014 at 7:48 AM, Thomas Schwinge wrote: > Hi! > > Ping. > > On Fri, 10 Jan 2014 12:59:50 +0100, I wrote: >> Ping, after another month. I've only received a private note from one >> build machinery manintainer who found this beyond his level of expertise, >> and wished me luck to f

Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals

2014-01-24 Thread Jakub Jelinek
On Fri, Jan 24, 2014 at 05:09:29PM +0100, Dodji Seketeli wrote: > * input.c (read_line_num): Gracefully handle non-file locations or > empty caches. > > diff --git a/gcc/input.c b/gcc/input.c > index 547c177..b05e1da 100644 > --- a/gcc/input.c > +++ b/gcc/input.c > @@ -600,7 +600,8 @@

Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals

2014-01-24 Thread Dodji Seketeli
Jakub Jelinek writes: > On Fri, Jan 24, 2014 at 04:40:52PM +0100, Dodji Seketeli wrote: >> > The patch causes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59935 . >> > The follow-up patch (fp == NULL check) doesn't help. >> >> I am looking into that, sorry for the inconvenience. > > I'd say we wa

ICE in Cilk Plus structured block checker (was: [gomp4] OpenACC structured blocks (was: PING: Fwd: Re: [patch] implement Cilk Plus simd loops on trunk))

2014-01-24 Thread Thomas Schwinge
Hi! Ping. With a different subject line, this time. Let's first concentrate on the ICE in the Cilk Plus structured block checker, then generalize diagnose_omp_blocks' structured block logic, before finally getting to the OpenACC extension. Here starts the ICE patch: On Fri, 10 Jan 2014 12:48:

Re: lto-plugin: mismatch between ld's architecture and GCC's configure --host

2014-01-24 Thread Thomas Schwinge
Hi! Ping. On Fri, 10 Jan 2014 12:59:50 +0100, I wrote: > Ping, after another month. I've only received a private note from one > build machinery manintainer who found this beyond his level of expertise, > and wished me luck to find someone else to review. Any takers in the new > year? > > On S

Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals

2014-01-24 Thread Jakub Jelinek
On Fri, Jan 24, 2014 at 04:40:52PM +0100, Dodji Seketeli wrote: > > The patch causes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59935 . > > The follow-up patch (fp == NULL check) doesn't help. > > I am looking into that, sorry for the inconvenience. I'd say we want something like following. Not

Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals

2014-01-24 Thread Dodji Seketeli
Markus Trippelsdorf writes: > On 2014.01.22 at 09:16 +0100, Dodji Seketeli wrote: >> Bernd Edlinger writes: >> >> > Hi, >> >> Hello, >> >> > since there was no progress in the last 2 months on that matter, >> >> Sorry, this is my bad. I got sidetracked by something else and forgot >> that I

Re: [C++ Patch] PR 57524

2014-01-24 Thread Jason Merrill
OK for trunk and 4.8. Jason

Re: [C PATCH] Improve locinfo a bit (PR c/59846)

2014-01-24 Thread Andreas Schwab
p; /* { dg-warning "14:comparison is always true due to > limited range of data type" } */ > +} FAIL: gcc.dg/pr59846.c (test for warnings, line 8) FAIL: gcc.dg/pr59846.c (test for warnings, line 14) FAIL: gcc.dg/pr59846.c (test for excess errors) Excess errors: /daten/aranym/gcc/gcc-

Re: [PATCH] preprocessor/58580 - preprocessor goes OOM with warning for zero literals

2014-01-24 Thread Markus Trippelsdorf
On 2014.01.22 at 09:16 +0100, Dodji Seketeli wrote: > Bernd Edlinger writes: > > > Hi, > > Hello, > > > since there was no progress in the last 2 months on that matter, > > Sorry, this is my bad. I got sidetracked by something else and forgot > that I had the patch working et al, and all its

[Ada] Failure to detect redeclaration of constant with initial aggregate value

2014-01-24 Thread Arnaud Charlet
This patch fixes an omission in the detection of illegal redeclarations of constants whose previous full declaration includes an expression that is an aggregate. Compiling double.adb must be rejected with: double.adb:5:04: "Data_1" conflicts with declaration at line 3 --- procedure Double is

[Ada] Discriminant checks on view conversions

2014-01-24 Thread Arnaud Charlet
This patch adds a discriminant check on actuals in a call, that are type conversions of a constrained discriminated object to a constrained type. Compiling and executing discr.adb must yield: discr.adb:12:11: warning: incorrect value for discriminant "J" discr.adb:12:11: warning: "Constrai

[Ada] Document check flags use in semantic analysis and expander

2014-01-24 Thread Arnaud Charlet
Document which check flags are completely set by semantic analysis, including in ASIS mode and GNATprove mode, and which check flags are only partially set. Analysis tools based on a tree obtained by semantic analysis only should thus rely only on the first category of flags to be set in the tree.

[Ada] Semantic checks on iterator specifications.

2014-01-24 Thread Arnaud Charlet
An iterator specification can include a subtype indication in the case of an array- or container-element iterator. This patch verifies that the subtype indication matches the element type of the array or container. Compiling the following must yield: range_in_iterator.adb:14:12: subtype indicat

[Ada] Fix function Prj.Env.Ada_Objects_Path

2014-01-24 Thread Arnaud Charlet
Function Prj.Env.Ada_Objects_Path was no conform to its documentation, in particular, the second call was returning the same value even if parameter Including_Libraries was different. This patch corrects this. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-01-24 Vincent Celier

[Ada] Allow raise expression in return statement

2014-01-24 Thread Arnaud Charlet
In Ada 2012, a neat way to write a function that is stubbed and just raises an exception is to write "return raise excep-name", where the return expression is a raise expression. But the parser did not allow that (legal) construct. This is now fixed. The following program: 1. procedure Retur

[Ada] Fix some missing cases of floating-point validity checks

2014-01-24 Thread Arnaud Charlet
When a program is compiled with -gnatVaf, all floating-point results of operators must be checked, since they might yield infinite or NaN results. Some cases of required checks, notably the result of object declarations with initialization expressions were not being checked. The following program,

[Ada] Missing error for derived task not overriding primitive

2014-01-24 Thread Arnaud Charlet
The compiler does not report an error when a task type does not define an entry or a procedure to cover a primitive inherited from an interface type. After this patch the following test compiles with an error: package Progenitor is type Progenitor_T is synchronized interface; procedure Primi

[Ada] Fix problem with run-time library units and SPARK mode

2014-01-24 Thread Arnaud Charlet
The test for library units was wrong, resulting in run-time library units being incorrectly marked with SPARK_Mode on when a configuration pragma file had pragma SPARK_Mode (ON). The following program 1. with Ada.Text_IO; use Ada.Text_IO; 2. procedure SPragLib is 3. begin 4.

[Ada] Protect against potentially uninitialized source information

2014-01-24 Thread Arnaud Charlet
Some tools that use the project manager might be creating a project on the fly (no reference to an actual project file), which could result in a Constraint_Error in this code. Tested on x86_64-pc-linux-gnu, committed on trunk 2014-01-24 Emmanuel Briot * prj-nmsc.adb (Check_File): Add

[Ada] Duplicate projects not detected

2014-01-24 Thread Arnaud Charlet
When the project path specified with environment variables ADA_PROJECT_PATH or GPR_PROJECT_PATH, or with switch -aP includes a directory where one project is found, this project may be used incorrectly when imported instead of the project with a similar name in the directory of the importing projec

[Ada] Turn off SPARK_Mode for generated subprograms

2014-01-24 Thread Arnaud Charlet
SPARK_Mode should always be off for internally generated subprograms When the following is compiled with -gnatdt: 1. package IntSPARK is 2.pragma SPARK_Mode (ON); 3.type R is record 4. X : Integer := 4; 5. Y : Integer := 5; 6.end record; 7

[C++ Patch] PR 57524

2014-01-24 Thread Paolo Carlini
HI, as far as I can see this regression, where we ICE inside timevar_start, is very easy to fix: just use timevar_cond_start instead (as in many other places for TV_NAME_LOOKUP). Tested x86_64-linux. Seems suited for 4_8-branch too. Thanks, Paolo. /cp 2014-01-24 Pa

Re: Allow passing arrays in registers on AArch64

2014-01-24 Thread Matthias Klose
Am 17.01.2014 19:50, schrieb Yufeng Zhang: > Hi Michael, > > Thanks for the fix. The patch looks OK to me in general, although I have some > minor comments below. > > On 01/17/14 08:22, Michael Hudson-Doyle wrote: >> Hi, as discussed inhttp://gcc.gnu.org/bugzilla/show_bug.cgi?id=59799 >> GCC cur

[Ada] Fix crash for bad Depends operand

2014-01-24 Thread Arnaud Charlet
This fixes a failure to properly diagnose a bad Depends operand. The following program used to provoke this crash: 1. procedure DependsCrash is 2.type R is record 3. B : Boolean; 4.end record; 5. 6.procedure Test (X : R; B : out Boolean)

Re: [RFA][PATCH] Fix tree-optimization/59919

2014-01-24 Thread Jakub Jelinek
On Thu, Jan 23, 2014 at 02:22:35PM -0700, Jeff Law wrote: > --- a/gcc/tree-vrp.c > +++ b/gcc/tree-vrp.c > @@ -5891,8 +5891,13 @@ find_assert_locations_1 (basic_block bb, sbitmap live) > } > } > > - register_new_assert_for (op, op, comp_code, value, bb, NU

Re: [PATCH, SH] fix builtin_strncmp

2014-01-24 Thread kkojima
Christian Bruel wrote: > This patch fixes a bug of mine whereas more bytes than needed was read > when processing remaining bytes after an aligned word at at time loop. > This case was not caught neither by the gcc testsuite not the glibc > tests, Regression test included. > > no new regressions

[committed] Fix PR59846 test

2014-01-24 Thread Marek Polacek
This patch makes the test pass even on -m32, where sizeof (int) == sizeof (long). Committed as obvious. 2014-01-24 Marek Polacek testsuite/ * gcc.dg/pr59846.c (fn1, fn2): Use ULL suffix. --- gcc/testsuite/gcc.dg/pr59846.c.mp 2014-01-24 11:24:49.143033290 +0100 +++ gcc/testsuite/gcc

Re: [PATCH] Documentation for dump and optinfo output

2014-01-24 Thread Thomas Schwinge
Hi! On Thu, 19 Dec 2013 01:44:08 -0800, Sharad Singhai wrote: > I ran 'make doc' and browsed the info output for basic sanity. Okay for trunk? > * Makefile.in: Add optinfo.texi. > * doc/optinfo.texi: New documentation for optimization info. > * doc/passes.texi: Add new node. T

[PATCH, SH] fix builtin_strncmp

2014-01-24 Thread Christian Bruel
Hi, This patch fixes a bug of mine whereas more bytes than needed was read when processing remaining bytes after an aligned word at at time loop. This case was not caught neither by the gcc testsuite not the glibc tests, Regression test included. no new regressions with the GCC and glibc testsui

Re: Handle XOR in canonicalize_condition

2014-01-24 Thread Richard Sandiford
Richard Sandiford writes: > The other problem is related to the way that MIPS16 tests for equality. > Conditional branches test register $24, and the only instructions that > set $24 are MOVE and CMP(I), which is actually an XOR rather than a > subtraction. Er, don't know what I was thinking here