[PATCH] Detect mixed usage of spaces and tabs.

2018-11-19 Thread Martin Liška
Hi. It's enhancement of the check_GNU_style_lib library. Detect situations where a space precedes a tab at the beginning of a line. I'm going to install the patch. Martin contrib/ChangeLog: 2018-11-19 Martin Liska * check_GNU_style_lib.py: Detect mixed usage of spaces and t

Re: [PATCH]Come up with -flive-patching master option.

2018-11-19 Thread Martin Liška
On 11/16/18 5:04 PM, Qing Zhao wrote: > >> On Nov 16, 2018, at 9:26 AM, Martin Liška > > wrote: >> >> On 11/16/18 2:36 AM, Qing Zhao wrote: >>> Hi, >>> >>> this is the new version of the patch. >>> >>> I have bootstrapped it on both aarch64 and x86,  no regression. >>> >>> p

[Ada] Remove obsolete code in UI_From_gnu

2018-11-19 Thread Eric Botcazou
Now that HOST_BITS_PER_WIDE_INT is always 64, we can get rid of disabled code in the UI_From_gnu routine. Tested on x86_64-suse-linux, applied on the mainline. 2018-11-19 Eric Botcazou * gcc-interface/cuintp.c (UI_From_gnu): Remove code for 32-bit hosts. -- Eric BotcazouIndex: gcc

Re: [doc, committed] clarify that "packed" attribute can apply to C++ classes

2018-11-19 Thread Jonathan Wakely
On 15/11/18 17:52 -0700, Sandra Loosemore wrote: I've checked in this patch for PR 25759, another minor documentation improvement. I'll commit this patch as obvious as soon as svn stops being slow. I wonder if the last sentence would be further improved by simply saying "not on a @code{typedef

[PATCH, libgcc/ARM & testsuite] Optimize executable size when using softfloat fmul/dmul

2018-11-19 Thread Thomas Preudhomme
Softfloat single precision and double precision floating-point multiplication routines in libgcc share some code with the floating-point division of their corresponding precision. As the code is structured now, this leads to *all* division code being pulled in an executable in softfloat mode even i

Fix bad interaction between ce and cmpelim passes on Visium

2018-11-19 Thread Eric Botcazou
This is a code quality regression that appeared during GCC 8 development on Visium in the form of the failure of gcc.target/visium/overflow*.c tests and that I swept under the rug back then. On architectures which do not provide scc instructions like Visium, you can nevertheless implement a few

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-19 Thread Richard Biener
On Sat, Nov 17, 2018 at 12:05 AM Martin Sebor wrote: > > To encourage and simplify the adoption of iterator classes in > GCC the attached patch turns the function_args_iterator struct > into an (almost) proper C++ iterator class that can be used > the same way as traditional forward iterators. > >

Re: [PATCH 1/2] Eliminate global state from -fsave-optimization-record

2018-11-19 Thread Richard Biener
On Sat, Nov 17, 2018 at 1:12 AM David Malcolm wrote: > > As work towards fixing PR tree-optimization/87025, this patch > eliminates global state from optinfo-emit-json.cc in favor > of adding an optional m_json_writer field to dump_context, > replacing the m_forcibly_enable_optinfo flag. > > This

Re: [PATCH 2/2] Fix -fsave-optimization-record ICE (PR tree-optimization/87025)

2018-11-19 Thread Richard Biener
On Sat, Nov 17, 2018 at 1:12 AM David Malcolm wrote: > > PR tree-optimization/87025 reports an ICE within > -fsave-optimization-record's optrecord_json_writer. > > The issue is that dump_context::begin_scope creates an optinfo > of kind OPTINFO_KIND_SCOPE, but fails to call > dump_context::end_any

Re: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626

2018-11-19 Thread Lokesh Janghel
Thank you Jakub, I update the patch with your comments and tested it. Please let me know your thoughts/suggestions. On Mon, Nov 19, 2018 at 4:00 PM Lokesh Janghel wrote: > > Thank you Jakub, I update the patch with your comments and tested it. > Please let me know your thoughts/suggestions. > > >

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-19 Thread Eric Botcazou
> Eventually, when GCC moves to more a recent C++ revision, it will > become possible to simplify the for loops to make use of the range > based for loop syntax along the lines of: > >for (auto argtype: function_args (functype)) > { >... > } > > Tested on x86_64-linux, and (

Re: [PATCH, libgcc/ARM & testsuite] Optimize executable size when using softfloat fmul/dmul

2018-11-19 Thread Thomas Preudhomme
FWIW, the testcases were taken from https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01026.html Previous approach for fixing tying of fmul to fdiv can be seen in https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01971.html. As mentioned in the cover letter, this patch went for a completely different appr

[PATCH] PR libstdc++/88084 - Implement LWG 2777

2018-11-19 Thread Jonathan Wakely
* include/std/string_view (basic_string_view::copy): Use traits to copy. * testsuite/21_strings/basic_string_view/operations/copy/char/2.cc: New test. * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc: New test. Tested x86_64-lin

Re: [PATCH, libstdc++] Implement P0415 More constexpr for std::complex.

2018-11-19 Thread Jonathan Wakely
On 16/11/18 19:39 -0500, Ed Smith-Rowland wrote: @@ -322,67 +323,43 @@ //@{ /// Return new complex value @a x plus @a y. template -inline complex<_Tp> +inline _GLIBCXX20_CONSTEXPR complex<_Tp> operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) -{ - complex<_Tp

[PATCH] Fix how we match for count(n*) in gcov tests.

2018-11-19 Thread Martin Liška
Hi. A small tweak in tests that fixes pattern of following form: /* count(1*). */ I'm going to install the patch. Martin gcc/testsuite/ChangeLog: 2018-11-19 Martin Liska * g++.dg/gcov/pr84548.C: Remove remove-gcda. * g++.dg/gcov/ternary.C: Likewise. * lib/gcov.exp: S

[PATCH] Fix PR87229

2018-11-19 Thread Richard Biener
The following fixes and ICE in the LTO streamer by releasing non-gimple-val sizepos values in free-lang-data. This works around(?) the C++ FE leaving non-gimplified abstract origins around. LTO bootstrapped & tested on x86_64-unknown-linux-gnu, applied to trunk sofar. Richard. >From f7ddb8b

[PATCH] Fix condition in lto-symtab.c (PR lto/88077).

2018-11-19 Thread Martin Liška
Hi. This patch fixes what I screwed in r256989, where I wrongly replaced TREE_CODE (TREE_TYPE (decl)) with TYPE_SIZE (decl), which is wrong. Patch survives testing on x86_64-linux-gnu. Ready for trunk? Thanks, Martin gcc/lto/ChangeLog: 2018-11-19 Martin Liska PR lto/88077 *

Re: [PATCH] Support simd function declarations via a pre-include.

2018-11-19 Thread Martin Liška
On 11/17/18 7:16 PM, Bernhard Reutner-Fischer wrote: > Hi > >> I'm sending version, I changed the container to hash_map that should >> provide >> faster look up. >> >> I've been testing the patch right now. > > In find_fortran_preinclude_file() you allocate the filename. Sure, but that's driver

Re: [PATCH] Support simd function declarations via a pre-include.

2018-11-19 Thread Martin Liška
On 11/16/18 4:12 PM, Martin Liška wrote: > On 11/16/18 2:49 PM, Jakub Jelinek wrote: >> On Fri, Nov 16, 2018 at 02:24:42PM +0100, Martin Liška wrote: >>> + if (gfc_match (" (%n) attributes simd", builtin) != MATCH_YES) >>> +return MATCH_ERROR; >>> + >>> + int builtin_kind = 0; >>> + if (gfc_

Re: [v3 PATCH] PR libstdc++/87855

2018-11-19 Thread Jonathan Wakely
On 15/11/18 14:00 +0200, Ville Voutilainen wrote: Tested on Linux-PPC64. Ok for trunk? Backports? One problem ... --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/optional/assignment/9.cc @@ -0,0 +1,98 @@ +// { dg-options "-std=gnu++17" } +// { dg-do compile } This needs to be: // { dg-d

Re: [PATCH] Support simd function declarations via a pre-include.

2018-11-19 Thread Jakub Jelinek
On Mon, Nov 19, 2018 at 01:15:43PM +0100, Martin Liška wrote: > 2018-11-15 Martin Liska > > * config/gnu-user.h (TARGET_F951_OPTIONS): New. > * gcc.c (find_fortran_preinclude_file): New function > to handle Fortran pre-include. > > gcc/fortran/ChangeLog: > > 2018-11-15 Mart

Re: Fix hashtable node deallocation

2018-11-19 Thread Jonathan Wakely
On 10/11/18 22:40 +0100, François Dumont wrote: While working on a hashtable enhancement I noticed that we are not using the correct method to deallocate node if the constructor throws in _ReuseOrAllocNode operator(). I had to introduce a new _M_deallocate_node_ptr for that as node value shall

Re: Fix hashtable node deallocation

2018-11-19 Thread Jonathan Wakely
On 17/11/18 22:01 +0100, François Dumont wrote: Here is the same patch but this time with a test change which is supposed to show the problem. However it doesn't because of:   _Pointer_adapter(element_type* __arg = 0)   { _Storage_policy::set(__arg); } which is not explicit. So is thi

Re: Fix __gnu_cxx::throw_allocator 2 * O(log(N)) complexity

2018-11-19 Thread Jonathan Wakely
On 13/11/18 07:15 +0100, François Dumont wrote: Oops, it was not the tested patch. Here it is. On 11/12/18 7:43 AM, François Dumont wrote: When doing some debugging session I noticed that the __gnu_cxx::throw_allocator doubles all lookup on both insert and erase. Using map::insert result and

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-19 Thread Michael Matz
Hi, On Fri, 16 Nov 2018, Segher Boessenkool wrote: > > I.e. like volatile they can arbitrarily change their value. I don't > > know if other peoples mind model is similar, but it certainly is the > > model that is implemented in the GIMPLE pipeline (and if memory serves > > well of the RTL pi

Re: [v3 PATCH] PR libstdc++/87855

2018-11-19 Thread Jonathan Wakely
On 19/11/18 12:28 +, Jonathan Wakely wrote: On 15/11/18 14:00 +0200, Ville Voutilainen wrote: Tested on Linux-PPC64. Ok for trunk? Backports? One problem ... --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/optional/assignment/9.cc @@ -0,0 +1,98 @@ +// { dg-options "-std=gnu++17" } +//

Re: [PATCH] Fix debuginfo in -fopenmp code (PR debug/87039)

2018-11-19 Thread Richard Biener
On Sat, 17 Nov 2018, Jakub Jelinek wrote: > On Sat, Nov 17, 2018 at 05:51:05PM +0100, Richard Biener wrote: > > On November 17, 2018 4:14:58 PM GMT+01:00, Jakub Jelinek > > wrote: > > >On Sat, Nov 17, 2018 at 08:31:32AM +0100, Richard Biener wrote: > > >> On November 16, 2018 10:10:00 PM GMT+01:

Re: [PATCH PR84648]Adjust loop exit conditions for loop-until-wrap cases.

2018-11-19 Thread Christophe Lyon
On Wed, 14 Nov 2018 at 11:10, bin.cheng wrote: > > -- > Sender:Richard Biener > Sent at:2018 Nov 13 (Tue) 23:03 > To:bin.cheng > Cc:GCC Patches > Subject:Re: [PATCH PR84648]Adjust loop exit conditions for loop-until-wrap > cases.

Re: [PATCH] Fix PR88031

2018-11-19 Thread Christophe Lyon
On Thu, 15 Nov 2018 at 14:41, Richard Biener wrote: > > > With one of my last changes we regressed here so this goes all the > way cleaning up things so we only have a single flag to > vectorizable_condition whetehr we are called from reduction context. > In theory the !multiple-types restriction

[committed] Add pr60994.C testcase (PR c++/60994)

2018-11-19 Thread Jakub Jelinek
Hi! This is a testcase from PR60994 #c7, which got fixed with PR77812 but the testcases from that PR look different from this one, so I've tested and committed this to trunk in order to close the PR. 2018-11-19 Jakub Jelinek PR c++/60994 * g++.dg/lookup/pr60994.C: New test. -

Re: [doc, committed] clarify that "packed" attribute can apply to C++ classes

2018-11-19 Thread Sandra Loosemore
On 11/19/18 2:52 AM, Jonathan Wakely wrote: On 15/11/18 17:52 -0700, Sandra Loosemore wrote: I've checked in this patch for PR 25759, another minor documentation improvement. I'll commit this patch as obvious as soon as svn stops being slow. Thank you. My eyes were kind of glazing over when

[PATCH] Fix stmt removal in vectorize_fold_left_reduction (PR tree-optimization/88071)

2018-11-19 Thread Jakub Jelinek
Hi! In these cases the stmts vectorize_fold_left_reduction is removing may have EH region of -2 attached to them, but because they are removed with false as remove_permanently or update_eh_info, the old stmts are kept in the EH tables and cause checking ICE. >From what I understand, the stmts are

Re: [PATCH] Fix stmt removal in vectorize_fold_left_reduction (PR tree-optimization/88071)

2018-11-19 Thread Richard Biener
On Mon, 19 Nov 2018, Jakub Jelinek wrote: > Hi! > > In these cases the stmts vectorize_fold_left_reduction is removing may have > EH region of -2 attached to them, but because they are removed with false > as remove_permanently or update_eh_info, the old stmts are kept in the EH > tables and caus

Re: [PATCH] Fix condition in lto-symtab.c (PR lto/88077).

2018-11-19 Thread Richard Biener
On Mon, Nov 19, 2018 at 1:12 PM Martin Liška wrote: > > Hi. > > This patch fixes what I screwed in r256989, where I wrongly replaced > TREE_CODE (TREE_TYPE (decl)) with TYPE_SIZE (decl), which is wrong. > > Patch survives testing on x86_64-linux-gnu. > > Ready for trunk? OK. > Thanks, > Martin >

Re: [PATCH] Disable unrolling for loops vectorised with non-constant VF (was: [PATCH][cunroll] Add unroll-known-loop-iterations-only param and use it in aarch64)

2018-11-19 Thread Richard Biener
On Fri, Nov 16, 2018 at 7:02 PM Kyrill Tkachov wrote: > > Hi all, > > This is an alternative to > https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00694.html > As richi suggested, this disables unrolling of loops vectorised with > variable-length SVE > in the vectoriser itself through the loop->unr

Re: [PING #4] [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-11-19 Thread Jeff Law
On 11/16/18 1:46 AM, Richard Biener wrote: > On Fri, Nov 16, 2018 at 4:09 AM Martin Sebor wrote: >> >> Ping: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01934.html >> >> Do I need to change something in this patch to make it acceptable >> or should I assume we will leave this bug in GCC unfixed?

[PATCH] Fix PR83215, remove alias-set zero case from component_uses_parent_alias_set_from

2018-11-19 Thread Richard Biener
The PR complains that with TYPE_TYPELESS_STORAGE in C++ now too much TBAA aliasing happens (not that this was unexpected). The reason for this with the testcase is the alias-set zero case in component_uses_parent_alias_set_from which history tells me was added for attribute((may_alias)) purposes

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-19 Thread Martin Sebor
On 11/19/2018 03:32 AM, Richard Biener wrote: On Sat, Nov 17, 2018 at 12:05 AM Martin Sebor wrote: To encourage and simplify the adoption of iterator classes in GCC the attached patch turns the function_args_iterator struct into an (almost) proper C++ iterator class that can be used the same w

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-19 Thread Martin Sebor
On 11/19/2018 03:48 AM, Eric Botcazou wrote: Eventually, when GCC moves to more a recent C++ revision, it will become possible to simplify the for loops to make use of the range based for loop syntax along the lines of: for (auto argtype: function_args (functype)) { ... } Te

[PATCH] S/390: Skip LT(G) peephole when literal pool is involved

2018-11-19 Thread Ilya Leoshkevich
Bootstrapped and regtested on s390x-redhat-linux. By the time peephole optimizations run, we've already made up our mind whether to use base-register or relative addressing for literal pool entries. LT(G) supports only base-register addressing, and so it is too late to convert L(G)RL + compare to

Fix ICE in cp_var_mod_type_p

2018-11-19 Thread Jan Hubicka
Hi, enable-checking compiler crashes in free_lang_data because verify_type is called too early (after we free data in types but before we clear the langhooks) and it ends up calling cp_var_mod_type_p which ICEs. This is fixed by moving type checking after hooks updates. It would be also possible

Re: [PING #4] [PATCH] look harder for MEM_REF operand equality to avoid -Wstringop-truncation (PR 84561)

2018-11-19 Thread Martin Sebor
On 11/16/2018 01:46 AM, Richard Biener wrote: On Fri, Nov 16, 2018 at 4:09 AM Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01934.html Do I need to change something in this patch to make it acceptable or should I assume we will leave this bug in GCC unfixed? So the

[PING] Re: [PATCH 1/2] C++: more location wrapper nodes (PR c++/43064, PR c++/43486)

2018-11-19 Thread David Malcolm
Ping, for these patches: [PATCH 1/2] C++: more location wrapper nodes (PR c++/43064, PR c++/43486) https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00304.html [PATCH 2/2] C++: improvements to binary operator diagnostics (PR c++/87504) https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00303.html Th

[PATCH] [aarch64] Add CPU support for Ampere Computing's eMAG.

2018-11-19 Thread Christoph Muellner
*** gcc/ChangeLog *** 2018-xx-xx Christoph Muellner * config/aarch64/aarch64-cores.def: Define emag * config/aarch64/aarch64-tune.md: Regenerated with emag * config/aarch64/aarch64.c: Defining tuning struct * doc/invoke.texi: Document mtune value --- gcc/config/

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-19 Thread Segher Boessenkool
On Mon, Nov 19, 2018 at 12:59:29PM +, Michael Matz wrote: > Hi, > > On Fri, 16 Nov 2018, Segher Boessenkool wrote: > > > > I.e. like volatile they can arbitrarily change their value. I don't > > > know if other peoples mind model is similar, but it certainly is the > > > model that is impl

Re: Tweak ALAP calculation in SCHED_PRESSURE_MODEL

2018-11-19 Thread Kyrill Tkachov
On 16/11/18 18:19, Pat Haugen wrote: On 11/8/18 6:10 AM, Kyrill Tkachov wrote: The attached patch avoids that by making the alap calculation only look at true dependencies. This shouldn't be too bad, since we use INSN_PRIORITY as the final tie-breaker than that does take anti-dependencies into

[PATCH, ARM] Improve robustness of -mslow-flash-data

2018-11-19 Thread Thomas Preudhomme
Hi, Current code to handle -mslow-flash-data in machine description files suffers from a number of issues which this patch fixes: 1) The insn_and_split in vfp.md to load a generic floating-point constant via GPR first and move it to VFP register are guarded by !reload_completed which is forbidde

[C++ Patch] PR 84636 ("internal compiler error: Segmentation fault (identifier_p()/grokdeclarator())")

2018-11-19 Thread Paolo Carlini
Hi, while working on some additional location fixes to grokbitfield - preparing testcases - I stumbled into this ICE on invalid, where in grokdeclarator we try to use identifier_p on a null unqualified_id. In practice, clang and edg behave in different ways and since I couldn't decide which o

Re: [PATCH][LRA] Fix PR88033: ICE in remove_some_program_points_and_update_live_ranges

2018-11-19 Thread Vladimir Makarov
On 11/16/2018 02:15 PM, Peter Bergner wrote: PR88033 shows a problem when handling simple copies from a register to itself: (insn (set (reg:DI NNN) (reg:DI NNN))) This was causing confusion in the code that performs liveness and conflict updates and program point updates in lra-lives.c.

Re: [PATCH][LRA] Fix PR88033: ICE in remove_some_program_points_and_update_live_ranges

2018-11-19 Thread Peter Bergner
On 11/19/18 1:17 PM, Vladimir Makarov wrote: > On 11/16/2018 02:15 PM, Peter Bergner wrote: >> PR88033 shows a problem when handling simple copies from a register to >> itself: >> >>    (insn (set (reg:DI NNN) (reg:DI NNN))) >> >> This was causing confusion in the code that performs liveness and c

[PATCH, middle-end]: Fix PR 88070, ICE in create_pre_exit, at mode-switching.c:438

2018-11-19 Thread Uros Bizjak
Hello! The assert in create_pre_exit at mode-switching.c expects return copy pair with nothing in between. However, the compiler starts mode switching pass with the following sequence: (insn 19 18 16 2 (set (reg:V2SF 21 xmm0) (mem/c:V2SF (plus:DI (reg/f:DI 7 sp) (const_int

Re: Tweak ALAP calculation in SCHED_PRESSURE_MODEL

2018-11-19 Thread Pat Haugen
On 11/19/18 11:54 AM, Kyrill Tkachov wrote: > On 16/11/18 18:19, Pat Haugen wrote: >> On 11/8/18 6:10 AM, Kyrill Tkachov wrote: >>> The attached patch avoids that by making the alap calculation only >>> look at true dependencies.  This shouldn't be too bad, since we use >>> INSN_PRIORITY as the fin

Re: C++ PATCH for c++/87781, detect invalid elaborated-type-specifier

2018-11-19 Thread Jason Merrill
OK, thanks. On Wed, Nov 14, 2018 at 3:32 PM Marek Polacek wrote: > > On Wed, Nov 14, 2018 at 10:03:50AM -0500, Jason Merrill wrote: > > On Wed, Nov 14, 2018 at 9:55 AM Marek Polacek wrote: > > > > > > In elaborated-type-specifier, the typename keyword can only follow a > > > nested-name-specifier

Re: Fix hashtable node deallocation

2018-11-19 Thread François Dumont
On 11/19/18 1:34 PM, Jonathan Wakely wrote: On 10/11/18 22:40 +0100, François Dumont wrote: While working on a hashtable enhancement I noticed that we are not using the correct method to deallocate node if the constructor throws in _ReuseOrAllocNode operator(). I had to introduce a new _M_deal

C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-19 Thread Marek Polacek
This patch implements another C++20 feature, nested inline namespaces. This was fairly simple, one just has to be careful not to blithely consume the inline keyword, making a non-valid program valid. Another minor gotcha was to handle the innermost 'inline' correctly. Note that inline namesp

[PATCH] v3: C/C++: add fix-it hints for missing '&' and '*' (PR c++/87850)

2018-11-19 Thread David Malcolm
On Fri, 2018-11-16 at 13:13 -0500, Jason Merrill wrote: > On Thu, Nov 15, 2018 at 4:48 PM David Malcolm > wrote: > > On Tue, 2018-11-13 at 16:34 -0500, Jason Merrill wrote: > > > On Mon, Nov 12, 2018 at 4:32 PM Martin Sebor > > > wrote: > > > > On 11/11/2018 02:02 PM, David Malcolm wrote: > > > >

Fix hashtable memory leak

2018-11-19 Thread François Dumont
There a memory leak when move assigning between 2 instances with different bucket count and non-propagating and unequal allocator instances (see new test03). I reduced code duplication to fix the issue as 1 of the 2 implementations was fine.     * include/bits/hashtable.h (_Hashtable<>::_M_r

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-19 Thread Jakub Jelinek
On Mon, Nov 19, 2018 at 04:21:19PM -0500, Marek Polacek wrote: > 2018-11-19 Marek Polacek > > Implement P1094R2, Nested inline namespaces. > * g++.dg/cpp2a/nested-inline-ns1.C: New test. > * g++.dg/cpp2a/nested-inline-ns2.C: New test. > * g++.dg/cpp2a/nested-inline-ns3.C

[PATCH] handle unusual targets in -Wbuiltin-declaration-mismatch (PR 88098)

2018-11-19 Thread Martin Sebor
The gcc.dg/Wbuiltin-declaration-mismatch-4.c test added with the recent -Wbuiltin-declaration-mismatch enhancement to detect calls with incompatible arguments to built-ins declared without a prototype fails on a few targets due to incorrect assumptions hardcoded into the test. Besides removing th

[doc, committed] mention shared libraries in docs for -l option

2018-11-19 Thread Sandra Loosemore
I've checked in this patch for PR 50250, following the suggestion in the issue to point to the linker documentation for definitive info on -l instead of trying to explain everything in great detail. -Sandra 2018-11-19 Sandra Loosemore PR driver/50250 gcc/ * doc/invoke.texi (Link Options

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-19 Thread Marek Polacek
On Mon, Nov 19, 2018 at 10:33:17PM +0100, Jakub Jelinek wrote: > On Mon, Nov 19, 2018 at 04:21:19PM -0500, Marek Polacek wrote: > > 2018-11-19 Marek Polacek > > > > Implement P1094R2, Nested inline namespaces. > > * g++.dg/cpp2a/nested-inline-ns1.C: New test. > > * g++.dg/cpp2a/nest

[PATCH, testsuite] indicate no "weak" support in pdp11

2018-11-19 Thread Paul Koning
This patch changes check_weak_available to report that pdp11 does not support "weak". A number of test case failures are caused by attempts to use weak support which is missing in the pdp11 flavor of a.out. I'm not sure if this is covered by target maintainer authority so I figure it's best to

Re: [PATCH, testsuite] indicate no "weak" support in pdp11

2018-11-19 Thread Jeff Law
On 11/19/18 3:18 PM, Paul Koning wrote: > This patch changes check_weak_available to report that pdp11 does not support > "weak". A number of test case failures are caused by attempts to use weak > support which is missing in the pdp11 flavor of a.out. > > I'm not sure if this is covered by tar

Re: [C++ Patch] PR 84636 ("internal compiler error: Segmentation fault (identifier_p()/grokdeclarator())")

2018-11-19 Thread Marek Polacek
On Mon, Nov 19, 2018 at 08:03:24PM +0100, Paolo Carlini wrote: > @@ -12245,8 +12246,9 @@ grokdeclarator (const cp_declarator *declarator, > error ("invalid use of %<::%>"); > return error_mark_node; > } > - else if (TREE_CODE (type) == FUNCTION_TYPE > -

Re: [PATCH] Fix PR83215, remove alias-set zero case from component_uses_parent_alias_set_from

2018-11-19 Thread Eric Botcazou
> Eric, do you know of any cases in Ada where a alias-set zero base > has non-alias-set zero children? The testsuite seems to be clean > but you never know... No, at least not off the top of my head; that would be weird in any case. -- Eric Botcazou

Re: [PATCH, middle-end]: Fix PR 88070, ICE in create_pre_exit, at mode-switching.c:438

2018-11-19 Thread Eric Botcazou
> The extra instruction is generated as a kludge in expand_function_end > to prevent instructions that may trap to be scheduled into function > epilogue. However, the same blockage is generated under exactly the > same conditions earlier in the expand_function_end. The first blockage > should preve

Re: [PATCH] avoid error_mark_node in -Wsizeof-pointer-memaccess (PR 88065)

2018-11-19 Thread Jeff Law
On 11/17/18 3:45 PM, Martin Sebor wrote: > -Wsizeof-pointer-memaccess fails with an ICE when one of > the arguments is ill-formed (error_mark_node).  To avoid > the error the attached patch has the function bail in this > case. > > Martin > > gcc-88065.diff > > PR c/88065 - ICE in -Wsizeof-point

Fix ICE in ipa-devirt

2018-11-19 Thread Jan Hubicka
Hi, this patch fixes the second ICE exposed by the new testcase Marxin added. Again the ODR warning needs work, so I commit it after getting it right. Bootstrapped/regtested x86_64-linux, comitted. PR lto/87957 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations. Index:

Re: [PATCH] avoid error_mark_node in -Wsizeof-pointer-memaccess (PR 88065)

2018-11-19 Thread Jakub Jelinek
On Mon, Nov 19, 2018 at 04:10:09PM -0700, Jeff Law wrote: > > PR c/88065 - ICE in -Wsizeof-pointer-memaccess on an invalid strncpy > > > > gcc/c-family/ChangeLog: > > > > PR c/88065 > > * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source > > or destination is an error. > >

Re: [PATCH, middle-end]: Fix PR 88070, ICE in create_pre_exit, at mode-switching.c:438

2018-11-19 Thread Uros Bizjak
On Mon, Nov 19, 2018 at 11:42 PM Eric Botcazou wrote: > > > The extra instruction is generated as a kludge in expand_function_end > > to prevent instructions that may trap to be scheduled into function > > epilogue. However, the same blockage is generated under exactly the > > same conditions earl

Re: [PATCH] avoid error_mark_node in -Wsizeof-pointer-memaccess (PR 88065)

2018-11-19 Thread Martin Sebor
On 11/19/2018 04:10 PM, Jeff Law wrote: On 11/17/18 3:45 PM, Martin Sebor wrote: -Wsizeof-pointer-memaccess fails with an ICE when one of the arguments is ill-formed (error_mark_node). To avoid the error the attached patch has the function bail in this case. Martin gcc-88065.diff PR c/88065

[PATCH] correct handling of EXCESS_PRECISION_EXPR in function calls (PR 88091)

2018-11-19 Thread Martin Sebor
The recent -Wbuiltin-declaration-mismatch enhancement to detect calls with incompatible arguments to built-ins declared without a prototype introduced a subtle bug in the detection of floating conversion errors when passing EXCESS_PRECISION_EXPR arguments to floating function parameters with diffe

Re: [PATCH, testsuite] indicate no "weak" support in pdp11

2018-11-19 Thread Paul Koning
> On Nov 19, 2018, at 5:20 PM, Jeff Law wrote: > > On 11/19/18 3:18 PM, Paul Koning wrote: >> This patch changes check_weak_available to report that pdp11 does not >> support "weak". A number of test case failures are caused by attempts to >> use weak support which is missing in the pdp11 f

[PATCH, testsuite] Fix pdp11 test failures

2018-11-19 Thread Paul Koning
This corrects a number of pdp11 test suite failures. The first set fail due to larger than supported alignment. The next two look for .ascii directives in the assembly output which pdp11 does not use. The last one needs adjustment because CSE loads subroutine addresses into registers in this

Re: [PATCH] v3: C/C++: add fix-it hints for missing '&' and '*' (PR c++/87850)

2018-11-19 Thread Joseph Myers
On Mon, 19 Nov 2018, David Malcolm wrote: > +/* C implementation of same_type_p. > + Returns true iff TYPE1 and TYPE2 are the same type, in the usual > + sense of `same'. */ > + > +bool > +same_type_p (tree type1, tree type2) > +{ > + return comptypes (type1, type2) == 1; > +} I don't think

[v3 PATCH] Housekeeping for the effective targets of optional's tests.

2018-11-19 Thread Ville Voutilainen
Tested on Linux-x64 for optional's tests only. Ok for trunk? 2018-11-20 Ville Voutilainen Housekeeping for the effective targets of optional's tests. * testsuite/20_util/optional/77288.cc: Adjust. * testsuite/20_util/optional/84601.cc: Likewise. * testsuite/20_util/optional/ass

Re: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87626

2018-11-19 Thread Umesh Kalappa
Hi Jakub , the attached patch is good to commit ? Thank you ~Umesh On Mon, Nov 19, 2018 at 4:00 PM Lokesh Janghel wrote: > > Thank you Jakub, I update the patch with your comments and tested it. > Please let me know your thoughts/suggestions. > > > Thanks > Lokesh > > On Fri, Nov 16, 2018 at 4:5

[RS6000] num_insns_constant ICE

2018-11-19 Thread Alan Modra
This patch came about from investigating an ICE that appeared when I was retesting an old half-baked patch of mine to rs6000_rtx_costs. The num_insns_constant ICE was introduced with git commit f337168d97. If a const_double is fed to rs6000_is_valid_and_mask and from there to rs6000_is_valid_mask w

Re: [PATCH, middle-end]: Fix PR 88070, ICE in create_pre_exit, at mode-switching.c:438

2018-11-19 Thread Eric Botcazou
> The blockage was introduced as a fix for PR14381 [1] in r79265 [2]. > Later, the blockage was moved after return label as a fix for PR25176 > [3] in r107871 [4]. > > After that, r122626 [5] moves the blockage after the label for the > naked return from the function. Relevant posts from gcc-patch