[PATCH 4/4][Ada,DJGPP] Ada support for DJGPP

2016-07-29 Thread Andris Pavenis
This last patch (4/4) contains DJGPP related changes to adaint.c (except one which belongs to patch 1/4). ChangeLog entry: 2016-07-30 Andris Pavenis * ada/adaint.c: Include process.h, signal.h, dir.h and utime.h for DJGPP. (DIR_SEPARATOR) define to '\\' for DJGPP.

[PATCH 3/4][Ada,DJGPP] Ada support for DJGPP

2016-07-29 Thread Andris Pavenis
This patch (3rd of 4) contains changes to gcc-interface/Makefile.in and DJGPP own implementation of system.ads. ChangeLog entry: 2016-07-30 Andris Pavenis * ada/gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Define for DJGPP target (EH_MECHANISM): Define to -gcc

[PATCH 1/4][Ada,DJGPP] Ada support for DJGPP

2016-07-29 Thread Andris Pavenis
This is first of 4 patches for DJGPP support of Ada compiler Patch adds support of handling DJGPP special paths which do not follow normal DOS file-name rules. Some details about handled DJGPP special pathnames: for example '/dev/c/foo' is interpreted as 'c:/foo', '/dev/env/DJDIR/include' is

[PATCH 2/4][Ada,DJGPP] Ada support for DJGPP

2016-07-29 Thread Andris Pavenis
This patch (2nd of 4) includes various changes to Ada related C files required for DJGPP support ChangeLog entry: 2016-07-30 Andris Pavenis * ada/ctrl_c.c: Do not use macro SA_RESTART for DJGPP. * ada/gsocket.h: Do not support sockets for DJGPP. *

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread Manuel López-Ibáñez
On 29 July 2016 at 18:27, David Malcolm wrote: > On Fri, 2016-07-29 at 17:53 +0100, Manuel López-Ibáñez wrote: >> On 29 July 2016 at 16:25, David Malcolm wrote: >> > >> > FWIW, it appears that clang uses the on-demand approach; the >> > relevant >> >

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread David Malcolm
On Fri, 2016-07-29 at 21:42 +, Joseph Myers wrote: > On Tue, 26 Jul 2016, David Malcolm wrote: > > > This patch implements precise tracking of source locations for the > > individual chars within string literals, so that we can e.g. > > underline > > specific ranges in -Wformat diagnostics.

Re: [PATCH] Replacing gcc's dependence on libiberty's fnmatch to gnulib's fnmatch

2016-07-29 Thread Manuel López-Ibáñez
On 29 July 2016 at 23:10, Joseph Myers wrote: > On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > >> >> GCC can run on other systems besides OSX and GNU/Linux, how can you >> >> test that your change does not break anything on those systems? >> >> >> > Well I have access

Re: [PATCH, rs6000] Fix some test failures on older hardware

2016-07-29 Thread Segher Boessenkool
On Fri, Jul 29, 2016 at 04:48:34PM -0500, Bill Schmidt wrote: > The two tests in this patch fail on POWER7 and older hardware because > the requisite __float128 library routines are not built there. This > patch corrects the tests to require POWER8 or later hardware. > > Tested on POWER7

Re: [PATCH] Replacing gcc's dependence on libiberty's fnmatch to gnulib's fnmatch

2016-07-29 Thread Prathamesh Kulkarni
On 30 July 2016 at 03:40, Joseph Myers wrote: > On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > >> >> GCC can run on other systems besides OSX and GNU/Linux, how can you >> >> test that your change does not break anything on those systems? >> >> >> > Well I have access

Re: [PATCH] accept flexible arrays in struct in unions (c++/71912 - [6/7 regression])

2016-07-29 Thread Martin Sebor
On 07/26/2016 12:53 PM, Jason Merrill wrote: On 07/23/2016 01:18 PM, Martin Sebor wrote: + /* A pair of the first non-static non-empty data members following + either the flexible array member, if found, or the zero-length + array member otherwise. AFTER[1] refers to the first such

Re: Implement -Wimplicit-fallthrough: core

2016-07-29 Thread Joseph Myers
On Fri, 22 Jul 2016, Marek Polacek wrote: > * I noticed that we don't diagnose e.g. '__attribute__((noreturn));' in > the C FE in certain contexts. Shouldn't be a showstopper though. Bug number? shadow_tag_warned is meant to diagnose empty declarations like that. (That attributes are

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-07-29 Thread Joseph Myers
On Mon, 18 Jul 2016, Martin Sebor wrote: > + /* Number of exponent digits or -1 when unknown. */ > + int expdigs = -1; > + /* 1 when ARG < 0, 0 when ARG >= 0, -1 when unknown. */ > + int negative = -1; > + /* Log10 of EXPDIGS. */ > + int logexpdigs = 2; > + > + const double log10_2 =

Re: [PATCH] Replacing gcc's dependence on libiberty's fnmatch to gnulib's fnmatch

2016-07-29 Thread Joseph Myers
On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > >> GCC can run on other systems besides OSX and GNU/Linux, how can you > >> test that your change does not break anything on those systems? > >> > > Well I have access to these two systems only. How would you suggest I > > test my patches on all

Re: Ping Re: Implement C _FloatN, _FloatNx types [version 5]

2016-07-29 Thread Michael Meissner
On Fri, Jul 29, 2016 at 05:37:26PM +, Joseph Myers wrote: > Ping. This patch > > (non-C-front-end parts) is pending review. I will look at this on Monday, unless somebody else gets to it first. -- Michael Meissner, IBM IBM, M/S

[PATCH, rs6000] Fix some test failures on older hardware

2016-07-29 Thread Bill Schmidt
Hi, The two tests in this patch fail on POWER7 and older hardware because the requisite __float128 library routines are not built there. This patch corrects the tests to require POWER8 or later hardware. Tested on POWER7 powerpc64-unknown-linux-gnu and on POWER8 powerpc64le-unknown-linux-gnu.

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread Joseph Myers
On Tue, 26 Jul 2016, David Malcolm wrote: > This patch implements precise tracking of source locations for the > individual chars within string literals, so that we can e.g. underline > specific ranges in -Wformat diagnostics. It handles macros, > concatenated tokens, escaped characters etc.

Re: [PR71078] x / abs(x) -> copysign (1.0, x)

2016-07-29 Thread Joseph Myers
On Tue, 26 Jul 2016, Richard Sandiford wrote: > (which are really just extended tree codes). I suppose copysign is > a special case since we can always open code it, but in general we > shouldn't fall back to something that could generate a call. We can't always open code copysign (IBM long

Re: [RFC] warn on dead function calls in ipa-pure-const [1/4]

2016-07-29 Thread Joseph Myers
On Tue, 26 Jul 2016, Prathamesh Kulkarni wrote: > + warning_at (gimple_location (g), OPT_Wunused_value, > + "Call from %s to %s has no effect", > + e->caller->name (), e->callee->name ()); Diagnostics should not start with capital letters. Function names in

Re: [PATCH] Replacing gcc's dependence on libiberty's fnmatch to gnulib's fnmatch

2016-07-29 Thread Joseph Myers
On Mon, 25 Jul 2016, Manuel López-Ibáñez wrote: > Also, are the files in gnulib and libiberty semantically identical? > The wiki page does not say anything about this. How did you check > this? The question is not whether they are semantically identical, but whether moving to the gnulib version

[PATCH, rs6000] Add missing boilerplate

2016-07-29 Thread Bill Schmidt
Hi, I forgot to add the usual licensing and copyright boilerplate to a couple of new files. Fixed here with attribution of the code origins. Bootstrapped, committed as obvious. Thanks, Bill 2016-07-29 Bill Schmidt * config/rs6000/_divkc3.c: Add

Re: [PATCH] Make check_effective_target_c++ work for libstdc++

2016-07-29 Thread Mike Stump
On Jul 29, 2016, at 12:43 PM, Jonathan Wakely wrote: > > I've been working on some changes to let the libstdc++ testsuite use > the same approach as G++ to specify a minimum language dialect for > tests. That means instead of hardcoding { dg-options "-std=gnu++11" } > we can

Re: [v3 PATCH] Implement C++17 variable templates for type traits.

2016-07-29 Thread Ville Voutilainen
On 29 July 2016 at 21:55, Jonathan Wakely wrote: > Apart from that it's fine - please go ahead and commit. > > Thanks for doing all this C++17 work. As you mentioned on IRC we'll > need to update the status tables in the manual and the GCC 7 release > notes, but I can take

[PATCH] Make check_effective_target_c++ work for libstdc++

2016-07-29 Thread Jonathan Wakely
I've been working on some changes to let the libstdc++ testsuite use the same approach as G++ to specify a minimum language dialect for tests. That means instead of hardcoding { dg-options "-std=gnu++11" } we can use { dg-do run { target c++11 } } and the test will be run for any implicit or

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-29 Thread Bernd Edlinger
On 07/29/16 19:28, Jeff Law wrote: > On 07/26/2016 09:48 AM, Bernd Edlinger wrote: > >> Richard, this was the latest version of the patch: >> https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01481.html >> >> >> Are you OK with my clean-up of the presumably dead function names, >> or would you like to

PR fortran/69867 -- Patch

2016-07-29 Thread Steve Kargl
Unless someone speaks up, I will commit the following patch as obvious. 2016-07-29 Steven G. Kargl PR fortran/69867 * decl.c (build_struct): Ensure that pointers point to something. 2016-07-29 Steven G. Kargl PR fortran/69867

Re: [v3 PATCH] Implement C++17 variable templates for type traits.

2016-07-29 Thread Jonathan Wakely
On 29/07/16 01:27 +0300, Ville Voutilainen wrote: Implement C++17 variable templates for type traits. * include/std/chrono (treat_as_floating_point_v): New. * include/std/ratio: (ratio_equal_v, ratio_not_equal_v) (ratio_less_v, ratio_less_equal_v, ratio_greater_v)

[PATCH] PR target/72748: Convert V1TImode register to TImode in debug insn

2016-07-29 Thread H.J. Lu
TImode register referenced in debug insn can be converted to V1TImode by scalar to vector optimization. When converting a TImode store to V1TImode, we need to check all debug insns on its use chain to convert the V1TImode register to SUBREG TImode if source register is undefined. Tested on

PR fortran/69962 -- Patch

2016-07-29 Thread Steve Kargl
I intend to commit the following patch unless someone speaks up before sometime tomorrow (i.e, Saturday). 2016-07-29 Steven G. Kargl PR fortran/69962 * decl.c (gfc_set_constant_character_len): if expr is not constant issue an error instead of an

Ping Re: Implement C _FloatN, _FloatNx types [version 5]

2016-07-29 Thread Joseph Myers
Ping. This patch (non-C-front-end parts) is pending review. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread David Malcolm
On Fri, 2016-07-29 at 17:53 +0100, Manuel López-Ibáñez wrote: > On 29 July 2016 at 16:25, David Malcolm wrote: > > > > FWIW, it appears that clang uses the on-demand approach; the > > relevant > > code appears to be StringLiteral::getLocationOfByte: > >

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-29 Thread Jeff Law
On 07/26/2016 09:48 AM, Bernd Edlinger wrote: Richard, this was the latest version of the patch: https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01481.html Are you OK with my clean-up of the presumably dead function names, or would you like to keep the quirks in special_function_p for now and

Re: Implement -Wimplicit-fallthrough: the rest

2016-07-29 Thread Joseph Myers
On Fri, 22 Jul 2016, Marek Polacek wrote: > gcc/go/ > * go-system.h (go_fallthrough): Define. > * gofrontend/escape.cc (Escape_analysis_assign::assign): Add > go_fallthrough. > * gofrontend/expressions.cc (Binary_expression::do_get_backend): > Likewise. gofrontend

Re: [PATCH] do not take mutex in _Unwind_Find_registered_FDE if there is no registered objects

2016-07-29 Thread Gleb Natapov
On Fri, Jul 29, 2016 at 10:54:21AM -0600, Jeff Law wrote: > On 07/29/2016 10:03 AM, Jeff Law wrote: > > > > It's been a couple years since I've really thought about these kinds of > > > > synchronization issues -- is it really safe in a weakly ordered > > > > processor to > > > > rely on the mutex

Re: [PATCH] do not take mutex in _Unwind_Find_registered_FDE if there is no registered objects

2016-07-29 Thread Jeff Law
On 07/29/2016 11:19 AM, Gleb Natapov wrote: I'll table your patch on that assumption. OK. Can you ping him about it after he will back or should I (although in another week I will be on PTO :))? We are suffering from unwind scalability problems in C++ exceptions and although this one patch

Re: [PATCH] do not take mutex in _Unwind_Find_registered_FDE if there is no registered objects

2016-07-29 Thread Gleb Natapov
On Fri, Jul 29, 2016 at 10:03:53AM -0600, Jeff Law wrote: > On 07/27/2016 10:24 PM, Gleb Natapov wrote: > > On Wed, Jul 27, 2016 at 05:12:18PM -0600, Jeff Law wrote: > > > On 07/25/2016 07:44 AM, Gleb Natapov wrote: > > > > _Unwind_Find_FDE calls _Unwind_Find_registered_FDE and it takes lock > >

Re: [PATCH] do not take mutex in _Unwind_Find_registered_FDE if there is no registered objects

2016-07-29 Thread Jeff Law
On 07/29/2016 10:03 AM, Jeff Law wrote: It's been a couple years since I've really thought about these kinds of synchronization issues -- is it really safe in a weakly ordered processor to rely on the mutex lock/unlock of the "object_mutex" to order the loads/stores of "unseen_objects" and

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-07-29 Thread Manuel López-Ibáñez
On 29 July 2016 at 17:51, Joseph Myers wrote: > On Wed, 20 Jul 2016, Manuel López-Ibáñez wrote: > >> On 20 July 2016 at 19:21, ayush goel wrote: >> > Hey, >> > As a first step of my GSOC project >> >

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread Manuel López-Ibáñez
On 29 July 2016 at 16:25, David Malcolm wrote: > > FWIW, it appears that clang uses the on-demand approach; the relevant > code appears to be StringLiteral::getLocationOfByte: > http://clang.llvm.org/doxygen/Expr_8cpp_source.html#l01008 As far as I know, llvm doesn't do

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-07-29 Thread Joseph Myers
On Wed, 20 Jul 2016, Manuel López-Ibáñez wrote: > On 20 July 2016 at 19:21, ayush goel wrote: > > Hey, > > As a first step of my GSOC project > > (https://gcc.gnu.org/wiki/replacelibibertywithgnulib) I have imported > > the gnulib library inside the gcc tree. I have

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-07-29 Thread Prathamesh Kulkarni
On 29 July 2016 at 05:40, Prathamesh Kulkarni wrote: > On 28 July 2016 at 20:14, Ramana Radhakrishnan > wrote: >> >>> appear UNSUPPORTED. >>> That's because this config appears to define >>> __ARM_ARCH_EXT_IDIV__ however idiv appears

Re: [PATCH 1/3] make pattern_regs a vec

2016-07-29 Thread Jeff Law
On 07/27/2016 07:17 PM, Trevor Saunders wrote: On Wed, Jul 27, 2016 at 04:15:02PM -0600, Jeff Law wrote: On 07/24/2016 03:10 PM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders gcc/ChangeLog: 2016-07-24 Trevor Saunders

Re: [PATCH] simplify-rtx.c: start adding selftests (v2)

2016-07-29 Thread Jeff Law
On 07/19/2016 09:46 AM, David Malcolm wrote: It almost seems like the iteration space has to be dependent on what you're testing. Ie, some tests you want to iterate over the standard integer modes. Other tests you might reasonably include FP modes. CC modes I think should be forbidden for

[PATCH, testsuite]: Add dg-add-options ieee to gcc.dg/pr59833.c

2016-07-29 Thread Uros Bizjak
Some targets need additional options to handle NaNs. 2016-07-29 Uros Bizjak * gcc.dg/pr59833.c: Use dg-add-options ieee. Tested on alpha-linux-gnu and x86_64-linux-gnu. Committed to mainline SVN. Uros. Index: gcc.dg/pr59833.c

Re: [patch,avr] minor tweaks for 8-bit operations

2016-07-29 Thread Georg-Johann Lay
On 14.07.2016 08:36, Denis Chertykov wrote: 2016-07-13 14:12 GMT+03:00 Georg-Johann Lay : This patch contains some unrelated tweaks - Supplying no-ldregs variant for andqi3, iorqi3 where a const_int mask affects only 1 bit - Some patterns that match situations with

Re: [PATCH] do not take mutex in _Unwind_Find_registered_FDE if there is no registered objects

2016-07-29 Thread Jeff Law
On 07/27/2016 10:24 PM, Gleb Natapov wrote: On Wed, Jul 27, 2016 at 05:12:18PM -0600, Jeff Law wrote: On 07/25/2016 07:44 AM, Gleb Natapov wrote: _Unwind_Find_FDE calls _Unwind_Find_registered_FDE and it takes lock even when there is no registered objects. As far as I see only statically

Re: [PATCH PR34114/1]More multiple_of_p cases.

2016-07-29 Thread Bin.Cheng
On Fri, Jul 29, 2016 at 4:50 PM, Jeff Law wrote: > On 07/29/2016 09:35 AM, Bin Cheng wrote: >> >> Hi, >> This is prerequisite patch for fixing PR34114 which reveals a weakness of >> GCC in analyzing niter for loop with NE_EXPR exit condition. For such >> loops, we quite often

Re: [PATCH PR34114/2]Prove no-overflow for loop with NE_EXPR exit condition and non-ONE step

2016-07-29 Thread Jeff Law
On 07/29/2016 09:35 AM, Bin Cheng wrote: Hi, This patch fixes PR34114. It proves no-overflow for loops with NE_EXPR exit condition and non-ONE step. The patch contains detailed comment about when a loop like (IV=base; IV != FINAL; IV += step) doesn't overflow. Bootstrap and test on x86_64

Re: [PATCH PR34114/1]More multiple_of_p cases.

2016-07-29 Thread Jeff Law
On 07/29/2016 09:35 AM, Bin Cheng wrote: Hi, This is prerequisite patch for fixing PR34114 which reveals a weakness of GCC in analyzing niter for loop with NE_EXPR exit condition. For such loops, we quite often need to check if delta (final - start) of loop range is multiple of IV's step.

[PATCH,rs6000] Add built-in function support Power9 binary floating point operations

2016-07-29 Thread Kelvin Nilsen
This patch adds built-in support for the following fourteen new binary floating point instructions introduced with the Power9 architecture: VSX Scalar Extract Exponent Double-Precision VSX Scalar Extract Significand Double-Precision VSX Scalar Insert Exponent Double-Precision VSX Scalar Compare

Re: [PATCH, Fortran, OpenACC] Fix PR70598, Fortran host_data ICE

2016-07-29 Thread Chung-Lin Tang
On 2016/7/21 07:13 PM, Jakub Jelinek wrote: > Better put every && on a separate line if the whole if (...) doesn't fit > on a single line. > >> > +&& !n->sym->attr.cray_pointer >> > +&& !n->sym->attr.cray_pointee) > This is too ugly. I'd instead move the

Re: C PATCH for c/71853 (ICE with uninitialized memory on invalid)

2016-07-29 Thread Jeff Law
On 07/27/2016 03:50 PM, Marek Polacek wrote: This testcase was breaking because we were using uninitialized memory coming from c_expr in c_parser_switch_statement. There, in case we hadn't seen '(' after switch, we called c_finish_case with uninitialized CE. Fixed thus. Bootstrapped/regtested

[PATCH PR34114/2]Prove no-overflow for loop with NE_EXPR exit condition and non-ONE step

2016-07-29 Thread Bin Cheng
Hi, This patch fixes PR34114. It proves no-overflow for loops with NE_EXPR exit condition and non-ONE step. The patch contains detailed comment about when a loop like (IV=base; IV != FINAL; IV += step) doesn't overflow. Bootstrap and test on x86_64 and AArch64. Is it OK? Thanks, bin

[PATCH PR34114/1]More multiple_of_p cases.

2016-07-29 Thread Bin Cheng
Hi, This is prerequisite patch for fixing PR34114 which reveals a weakness of GCC in analyzing niter for loop with NE_EXPR exit condition. For such loops, we quite often need to check if delta (final - start) of loop range is multiple of IV's step. This patch proves multiple_of_p (top,

Re: C PATCH for c/71573 (ICE with invalid redeclaration)

2016-07-29 Thread Jeff Law
On 07/28/2016 09:18 AM, Marek Polacek wrote: When we're trying to implicitly declare a function, we first search the scope looking for whether the function identifier is already bound to a declaration. But as the following test shows, we might find something else other than a FUNCTION_DECL like

Re: C/C++ PATCH to improve location for -Wparentheses (PR c/71926)

2016-07-29 Thread Jeff Law
On 07/29/2016 08:35 AM, Marek Polacek wrote: These two parentheses warnings were missing proper location arguments, so the location info was less than satisfying. Fixed thus. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-07-29 Marek Polacek PR

Re: C PATCH to rephrase error for flexible array members (PR c/71742)

2016-07-29 Thread Jeff Law
On 07/29/2016 09:22 AM, Marek Polacek wrote: As outlined in the PR, for code such as struct S { int :1; int a[]; }; the error message "flexible array member in otherwise empty struct" is not entirely correct, because the structure isn't otherwise empty. Martin Sebor suggested to

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread David Malcolm
On Fri, 2016-07-29 at 10:46 -0400, David Malcolm wrote: > On Fri, 2016-07-29 at 08:22 -0600, Martin Sebor wrote: > > > Currently all that we need from the C family of frontends is the > > > cpp_reader and the string concatenation records. I think we can > > > reconstruct the cpp_reader if we have

Re: [libiberty] fix unbounded alloca in make_relative_prefix_1

2016-07-29 Thread Bernd Schmidt
On 07/29/2016 05:07 PM, Aldy Hernandez wrote: There is currently only one use, but I was thinking that perhaps if there were other alloca uses added later (I hope not), that they could all use the same macro. But I am more than happy to place this definition it in it's only use file for now, if

C PATCH to rephrase error for flexible array members (PR c/71742)

2016-07-29 Thread Marek Polacek
As outlined in the PR, for code such as struct S { int :1; int a[]; }; the error message "flexible array member in otherwise empty struct" is not entirely correct, because the structure isn't otherwise empty. Martin Sebor suggested to rephrase the error message as in the following.

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-29 Thread Richard Biener
On July 29, 2016 4:32:40 PM GMT+02:00, Prathamesh Kulkarni wrote: >On 29 July 2016 at 12:42, Richard Biener wrote: >> On Fri, 29 Jul 2016, Prathamesh Kulkarni wrote: >> >>> On 28 July 2016 at 19:18, Richard Biener wrote: >>>

Re: [libiberty] fix unbounded alloca in make_relative_prefix_1

2016-07-29 Thread Ian Lance Taylor
On Fri, Jul 29, 2016 at 5:30 AM, Aldy Hernandez wrote: > At least a cursory look at gcc/gcc-ar.c has us doing: > > self = getenv ("GCC_EXEC_PREFIX"); > ... > self_exec_prefix = make_relative_prefix (self, ... > > So the alloca() in make_relative_prefix() can be called with

Re: [libiberty] fix unbounded alloca in make_relative_prefix_1

2016-07-29 Thread Bernd Schmidt
On 07/29/2016 02:30 PM, Aldy Hernandez wrote: +/* Max number of alloca bytes per call before we must switch to malloc. + + ?? Swiped from gnulib's regex_internal.h header. Is this actually + the case? This number seems arbitrary, though sane. + + The OS usually guarantees only one guard

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread David Malcolm
On Fri, 2016-07-29 at 08:22 -0600, Martin Sebor wrote: > > Currently all that we need from the C family of frontends is the > > cpp_reader and the string concatenation records. I think we can > > reconstruct the cpp_reader if we have the options, though > > presumably > > that's per TU, so to

C/C++ PATCH to improve location for -Wparentheses (PR c/71926)

2016-07-29 Thread Marek Polacek
These two parentheses warnings were missing proper location arguments, so the location info was less than satisfying. Fixed thus. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-07-29 Marek Polacek PR c/71926 * c-common.c

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-29 Thread Prathamesh Kulkarni
On 29 July 2016 at 12:42, Richard Biener wrote: > On Fri, 29 Jul 2016, Prathamesh Kulkarni wrote: > >> On 28 July 2016 at 19:18, Richard Biener wrote: >> > On Thu, 28 Jul 2016, Prathamesh Kulkarni wrote: >> > >> >> On 28 July 2016 at 15:58, Andreas Schwab

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread Martin Sebor
Currently all that we need from the C family of frontends is the cpp_reader and the string concatenation records. I think we can reconstruct the cpp_reader if we have the options, though presumably that's per TU, so to support all this we'd need to capture e.g. the per -TU encoding information

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-07-29 Thread Yuri Rumyantsev
Hi Richard. It turned out that the fix proposed by you does not work for liggomp tests simd3 and simd4. The reason is that we can't change safelen value for references not defined inside loop. So I add missed check on it to patch. Is it OK for trunk? ChangeLog: 2016-07-29 Yuri Rumyantsev

Re: [C++ PATCH] for PR72457

2016-07-29 Thread Jason Merrill
On Thu, Jul 28, 2016 at 2:56 AM, Markus Trippelsdorf wrote: > On 2016.07.27 at 17:21 -0400, Jason Merrill wrote: >> On Wed, Jul 27, 2016 at 2:50 AM, Markus Trippelsdorf >> wrote: >> > On 2016.07.23 at 22:55 -0400, Jason Merrill wrote: >> >> Using

Re: [PATCH] Fix wrong code on aarch64 due to paradoxical subreg

2016-07-29 Thread Bernd Edlinger
On 07/29/16 09:02, Segher Boessenkool wrote: > On Thu, Jul 28, 2016 at 08:59:44PM +, Bernd Edlinger wrote: >> (insn 1047 1044 1048 101 (set (reg/f:DI 481) >> (subreg:DI (reg/f:SI 545) 0)) isl_input.c:2496 50 {*movdi_aarch64} >>(nil)) > > In your first mail you showed reg 481

Re: [PATCH 1/3] (v2) On-demand locations within string-literals

2016-07-29 Thread David Malcolm
On Thu, 2016-07-28 at 15:16 -0600, Martin Sebor wrote: > On 07/28/2016 02:38 PM, Martin Sebor wrote: > > On 07/28/2016 02:12 PM, David Malcolm wrote: > > > On Wed, 2016-07-27 at 23:41 +0100, Manuel López-Ibáñez wrote: > > > > On 27 July 2016 at 15:30, David Malcolm > > > >

Re: Implement -Wimplicit-fallthrough (take 2): fix missing breaks

2016-07-29 Thread Marek Polacek
On Fri, Jul 29, 2016 at 02:14:01PM +0200, Uros Bizjak wrote: > Hello! > > > This is what the new warning pointed out. I think all these are bugs. > > > > This patch has been tested on powerpc64le-unknown-linux-gnu, > > aarch64-linux-gnu, > > and x86_64-redhat-linux. > > > > 2016-07-27 Marek

[libiberty] fix unbounded alloca in make_relative_prefix_1

2016-07-29 Thread Aldy Hernandez
At least a cursory look at gcc/gcc-ar.c has us doing: self = getenv ("GCC_EXEC_PREFIX"); ... self_exec_prefix = make_relative_prefix (self, ... So the alloca() in make_relative_prefix() can be called with the strlen of some random env var. Anyways... regardless... all unchecked alloca

Re: Implement -Wimplicit-fallthrough (take 2): fix missing breaks

2016-07-29 Thread Uros Bizjak
Hello! > This is what the new warning pointed out. I think all these are bugs. > > This patch has been tested on powerpc64le-unknown-linux-gnu, > aarch64-linux-gnu, > and x86_64-redhat-linux. > > 2016-07-27 Marek Polacek > > PR c/7652 > gcc/ > * config/i386/i386.c

Re: [C PATCH] Don't mark C99 inline functions as always_inline (PR c/71969)

2016-07-29 Thread Marek Polacek
On Mon, Jul 25, 2016 at 11:22:53AM -0600, Jeff Law wrote: > Just a note, Jakub is on PTO this week and next week -- he'll commit when he > returns. Or if this is time critical, anyone with commit privileges can > commit on Jakub's behalf. I just done so. Marek

Ping: [PATCH build/doc] Replacing libiberty with gnulib

2016-07-29 Thread ayush goel
This patch https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01302.html is still pending review. -Ayush

[PATCH][AArch64] Optimize prolog/epilog

2016-07-29 Thread Wilco Dijkstra
This patch optimizes the prolog and epilog code to reduce the number of instructions and avoid multiple writes to SP. The key idea is that epilogs are almost exact reverses of prologs, and thus all the decisions only need to be taken once. The frame layout is decided in aarch64_layout_frame()

Re: [patch, avr] Fix mmcu to specs issues

2016-07-29 Thread Pitchumani Sivanupandi
On Friday 29 July 2016 02:06 PM, Georg-Johann Lay wrote: On 28.07.2016 13:50, Pitchumani Sivanupandi wrote: On Tuesday 26 July 2016 06:00 PM, Georg-Johann Lay wrote: On 26.07.2016 12:20, Pitchumani Sivanupandi wrote: avr-gcc expected to find the device specs in the search paths specified. But

Re: [PATCH] Update libstdc++ baseline symbols

2016-07-29 Thread Andreas Schwab
I've committed the updates for aarch64, ia64, m68k. Andreas. * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update. Index:

Re: [Patch, tentative, reload] Make push_reload work with more types of subregs?

2016-07-29 Thread Bernd Schmidt
On 07/28/2016 09:33 AM, Senthil Kumar Selvaraj wrote: Is there a reason why only REG and SYMBOL_REFs get valid subreg_in_class? I tried extending it handle constants and PLUS expressions, and it fixes PR 71873. It also fixes a another bug that was a work around for the reload failure

Re: C PATCH for c/71583 (ICE with bogus compound literal)

2016-07-29 Thread Bernd Schmidt
On 07/28/2016 03:19 PM, Marek Polacek wrote: Since r157233, build_compound_literal will return error_mark_node for erroneous initializers of compound literals. This caused an ICE in c_parser_postfix_expression_after_paren_type because the code dealing with evaluating variably modified types

Re: C PATCH for c/71574 (ICE with alloc_align attribute)

2016-07-29 Thread Bernd Schmidt
On 07/28/2016 03:26 PM, Marek Polacek wrote: Many attributes that accept integer constant as a parameter call default_conversion for such constants to perform the usual arithmetic conversions. The call to default_conversion is always guarded so as to prevent a NULL_TREE, an IDENTIFIER_NODE, or

[PATCH] Update libstdc++ docs for library version history

2016-07-29 Thread Jonathan Wakely
This should have been added to the manual before the 6.1 release, but better late than never. * doc/xml/manual/abi.xml: Document 6.0.22 library version. * doc/html/manual/abi.html: Regenerate. Committed to trunk and gcc-6-branch. commit 7f037f534d71ed4b635af09e33219c1d063e241c

[PATCH] New libstdc++ symbol version for new basic_string symbols

2016-07-29 Thread Jonathan Wakely
This bumps the library version to libstdc++.so.6.0.23 because we have a load of new symbols appearing in std::basic_string. * acinclude.m4 (libtool_VERSION): Bump to 6:23:0. * config/abi/pre/gnu.ver: Add 3.4.23 version for new basic_string symbols. * configure:

[PATCH] Update libstdc++ baseline symbols

2016-07-29 Thread Jonathan Wakely
I need to bump the library version to libstdc++.so.6.0.23 so we need updated baselines for the 6.0.22 version, which this patch provides. I've only generated new baselines for x86 (not including x32) and ppc, so could target maintainers (or anyone with suitable targets built) please update

Re: Implement -Wimplicit-fallthrough (take 2): fix missing breaks

2016-07-29 Thread Marek Polacek
On Fri, Jul 29, 2016 at 01:46:11AM -0500, Segher Boessenkool wrote: > On Thu, Jul 28, 2016 at 05:57:34PM +0200, Marek Polacek wrote: > > Segher, is the rs6000.c part ok? > > Yes, that looks fine, thanks! Will you handle the backports as well? Happy to, just not sure about 4.9. Richi, is it ok

[avr,committed]: Remove superfluous CLR of zero_reg.

2016-07-29 Thread Georg-Johann Lay
https://gcc.gnu.org/r238850 Applied this obvious change to __muldi3 which cleared zero_reg at the end of the function. This is not needed because there was a call to __umulsidi3 which already cleared zero_reg. Johann libgcc/ * config/avr/lib1funcs.S (__muldi3) [have MUL]: No need

Re: [patch] Fix PR71976 in combine.c:get_last_value()

2016-07-29 Thread Segher Boessenkool
On Fri, Jul 29, 2016 at 10:56:22AM +0200, Georg-Johann Lay wrote: > The issue with wrong-code bug PR71976 is that combine.c:get_last_value was > called for a hard register in a wider mode (DImode) than the stored value > had (QImode). The patch introduces a test of the mode precision and only

[patch] Fix PR71976 in combine.c:get_last_value()

2016-07-29 Thread Georg-Johann Lay
The issue with wrong-code bug PR71976 is that combine.c:get_last_value was called for a hard register in a wider mode (DImode) than the stored value had (QImode). The patch introduces a test of the mode precision and only returns the recorded value if the according mode is not smaller than the

Re: [5.0 Backport][AArch64] Fix simd intrinsics bug on float vminnm/vmaxnm

2016-07-29 Thread Jiong Wang
Jiong Wang writes: > On 07/07/16 10:34, James Greenhalgh wrote: >> >> To make backporting easier, could you please write a very simple >> standalone test that exposes this bug, and submit this patch with just >> that simple test? I've already OKed the functional part of this patch, and >> I'm

Re: [patch, avr] Fix mmcu to specs issues

2016-07-29 Thread Georg-Johann Lay
On 28.07.2016 13:50, Pitchumani Sivanupandi wrote: On Tuesday 26 July 2016 06:00 PM, Georg-Johann Lay wrote: On 26.07.2016 12:20, Pitchumani Sivanupandi wrote: avr-gcc expected to find the device specs in the search paths specified. But it doesn't work as expected when device specs in

Re: [PATCH] gfortran: Fix allocation of diagnostig string (was too small).

2016-07-29 Thread Andreas Krebbel
On 07/26/2016 05:42 PM, Dominik Vogt wrote: > gcc/fortran/ChangeLog > > * trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic > message (was too small). Applied. Thanks! -Andreas-

Re: [PR70920] transform (intptr_t) x eq/ne CST to x eq/ne (typeof x) cst

2016-07-29 Thread Richard Biener
On Fri, 29 Jul 2016, Prathamesh Kulkarni wrote: > On 28 July 2016 at 19:18, Richard Biener wrote: > > On Thu, 28 Jul 2016, Prathamesh Kulkarni wrote: > > > >> On 28 July 2016 at 15:58, Andreas Schwab wrote: > >> > On Mo, Jul 25 2016, Prathamesh Kulkarni

Re: [PATCH] Fix wrong code on aarch64 due to paradoxical subreg

2016-07-29 Thread Segher Boessenkool
On Thu, Jul 28, 2016 at 08:59:44PM +, Bernd Edlinger wrote: > (insn 1047 1044 1048 101 (set (reg/f:DI 481) > (subreg:DI (reg/f:SI 545) 0)) isl_input.c:2496 50 {*movdi_aarch64} > (nil)) In your first mail you showed reg 481 as _not_ being REG_POINTER: (insn 1047 1046 1048 (set

Re: [PATCH, 2 of 4], Enhance PowerPC vec_extract support for power8/power9 machines

2016-07-29 Thread Segher Boessenkool
On Thu, Jul 28, 2016 at 03:44:25PM -0400, Michael Meissner wrote: > > This isn't in the changelog. > > Yes it is. I need new glasses. > > > +/* Macro to say whether we can optimize vector extracts. */ > > > +#define VEC_EXTRACT_OPTIMIZE_P (TARGET_DIRECT_MOVE > > > \ > >

Re: Implement -Wimplicit-fallthrough (take 2): fix missing breaks

2016-07-29 Thread Segher Boessenkool
On Thu, Jul 28, 2016 at 05:57:34PM +0200, Marek Polacek wrote: > Segher, is the rs6000.c part ok? Yes, that looks fine, thanks! Will you handle the backports as well? Segher

[PING][PATCH 3/3][GCC-6] Backport support for arm*-*-phoenix* targets in libgcc.

2016-07-29 Thread Jakub Sejdak
Hi, I'd like to ping this patch to GCC-6 branch. Regards, Kuba Sejdak 2016-07-22 8:27 GMT+02:00 Kuba Sejdak : > This patch is already in trunk. It adds no new features, just new arm-phoenix* > OS target to libgcc. > I have SVN write access, so only approval is needed.

[PING][PATCH 2/3][GCC-6] Backport support for arm*-*-phoenix* targets.

2016-07-29 Thread Jakub Sejdak
Hi, I'd like to ping this patch to GCC-6 branch. Regards, Kuba Sejdak 2016-07-22 8:27 GMT+02:00 Kuba Sejdak : > This patch is already in trunk. It adds no new features, just new arm-phoenix* > OS target to gcc config. > I have SVN write access, so only approval is

[PING][PATCH 1/3][GCC-6] Backport support for Phoenix-RTOS targets in config.sub.

2016-07-29 Thread Jakub Sejdak
Hi, I'd like to ping this patch to GCC-6 branch. Regards, Kuba Sejdak 2016-07-22 8:27 GMT+02:00 Kuba Sejdak : > This patch is already in trunk. It adds no new features, just new OS target. > I have SVN write access, so only approval is needed. Is it OK for gcc-6 >