Re: [PATCH] Fix PR70985

2019-12-13 Thread Richard Biener
On December 14, 2019 6:28:48 AM GMT+01:00, Andrew Pinski wrote: >On Mon, May 9, 2016 at 2:32 AM Richard Biener >wrote: >> >> >> I am testing the following followup to my BIT_FIELD_REF >simplification >> changes which resolve issues when applying to memory BIT_FIELD_REFs. >> >> Bootstrap and regt

Re: [PATCH] Fix PR70985

2019-12-13 Thread Andrew Pinski
On Mon, May 9, 2016 at 2:32 AM Richard Biener wrote: > > > I am testing the following followup to my BIT_FIELD_REF simplification > changes which resolve issues when applying to memory BIT_FIELD_REFs. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. My question is not directly relat

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Stefan Franke
Am 2019-12-14 04:03, schrieb Andrew Pinski: On Fri, Dec 13, 2019 at 6:56 PM Stefan Franke wrote: Am 2019-12-13 21:59, schrieb Segher Boessenkool: > On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: >> Am 2019-12-13 18:58, schrieb Segher Boessenkool: >> >On Fri, Dec 13, 2019 at 05:

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Andrew Pinski
On Fri, Dec 13, 2019 at 6:56 PM Stefan Franke wrote: > > Am 2019-12-13 21:59, schrieb Segher Boessenkool: > > On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: > >> Am 2019-12-13 18:58, schrieb Segher Boessenkool: > >> >On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: >

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Stefan Franke
Am 2019-12-13 21:59, schrieb Segher Boessenkool: On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: Am 2019-12-13 18:58, schrieb Segher Boessenkool: >On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: >>Why? If you are using a cc register plus your architecture as many >>

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-13 Thread Martin Sebor
After more testing by Jeff's buildbot and correcting the problems it exposed I have committed the attached patch in r279392. Martin On 12/11/19 4:23 PM, Martin Sebor wrote: Jeff's buildbot exposed a bug in the patch that caused false positives in cases involving negative offsets into destinatio

Re: 'find_group_last' (was: [PATCH] OpenACC reference count overhaul)

2019-12-13 Thread Julian Brown
On Fri, 13 Dec 2019 16:25:25 +0100 Thomas Schwinge wrote: > Hi Julian! > > On 2019-10-29T12:15:01+, Julian Brown > wrote: > > static int > > -find_pointer (int pos, size_t mapnum, unsigned short *kinds) > > +find_group_last (int pos, size_t mapnum, unsigned short *kinds) > > { > > - if (

Re: [OpenACC] Elaborate/simplify 'exit data' 'finalize' handling (was: [OpenACC] Update OpenACC data clause semantics to the 2.5 behavior)

2019-12-13 Thread Julian Brown
On Fri, 13 Dec 2019 15:13:53 +0100 Thomas Schwinge wrote: > Hi! > > Julian, Tobias, regarding the following OpenACC 'exit data' 'finalize' > handling: > > On 2018-05-25T13:01:58-0700, Cesar Philippidis > wrote: > > --- a/gcc/gimplify.c > > +++ b/gcc/gimplify.c > > > @@ -10859,6 +10849,53 @@

Re: C++ PATCH for c++/88337 - Implement P1327R1: Allow dynamic_cast in constexpr

2019-12-13 Thread Jason Merrill
On 12/13/19 3:20 PM, Marek Polacek wrote: On Thu, Dec 12, 2019 at 02:38:29PM -0500, Jason Merrill wrote: On 12/11/19 5:50 PM, Marek Polacek wrote: On Fri, Nov 22, 2019 at 04:11:53PM -0500, Jason Merrill wrote: On 11/8/19 4:24 PM, Marek Polacek wrote: 2) [class.cdtor] says that when a dynami

gccgo branch updated

2019-12-13 Thread Ian Lance Taylor
I've updated the gccgo branch to revision 279380 of trunk. Ian

[PATCH] Fix pretty printers tests

2019-12-13 Thread François Dumont
Here is a patch to fix prettyprinters.exp failures in normal and debug modes. In 80276.cc I replicate the #define with comment from other tests even if it isn't true that cxx11 abi string isn't supported. It's just that it doesn't appear as 'std::string', the aliasing doesn't work. I still h

[Darwin, PPC, committed] Use Darwin9 dylib header for Rosetta builds.

2019-12-13 Thread Iain Sandoe
On Darwin10 it's possible to make a 32b PPC build using the 'Rosetta' emulator. However, these builds need to make use of Darwin9 crts (for exes and dylibs). This adds the change to cater for dylibs. tested on a powerpc-darwin10 native and a powerpc-darwin10 cross from x86_64-darwin16. applied

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Segher Boessenkool
On Fri, Dec 13, 2019 at 08:55:15PM +0100, Stefan Franke wrote: > Am 2019-12-13 18:58, schrieb Segher Boessenkool: > >On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: > >>Why? If you are using a cc register plus your architecture as many > >>instructions which may clobber that cc regis

Re: C++ PATCH for c++/88337 - Implement P1327R1: Allow dynamic_cast in constexpr

2019-12-13 Thread Marek Polacek
On Thu, Dec 12, 2019 at 02:38:29PM -0500, Jason Merrill wrote: > On 12/11/19 5:50 PM, Marek Polacek wrote: > > On Fri, Nov 22, 2019 at 04:11:53PM -0500, Jason Merrill wrote: > > > On 11/8/19 4:24 PM, Marek Polacek wrote: > > > > > 2) [class.cdtor] says that when a dynamic_cast is used in a constru

libbacktrace patch committed: Add DWARF 5 support

2019-12-13 Thread Ian Lance Taylor
This patch to libbacktrace adds DWARF 5 support. I tested this with GCC 8, GCC tip, and clang 8, using the -gdwarf-5 option. Bootstrapped and ran libbacktrace and libgo tests on x86_64-pc-linux-gnu. Committed to mainline. Ian 2019-12-13 Ian Lance Taylor Add DWARF 5 support. * dwarf.c (struc

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Stefan Franke
Am 2019-12-13 18:58, schrieb Segher Boessenkool: Hi! On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: I suggest this patch to allow architectures do substitute cc0_rtx with a generated cc register. Why? If you are using a cc register plus your architecture as many instructions w

Re: [PATCH 16/45] analyzer: new builtins

2019-12-13 Thread David Malcolm
On Fri, 2019-12-13 at 19:27 +0100, Jakub Jelinek wrote: > On Fri, Dec 13, 2019 at 01:11:05PM -0500, David Malcolm wrote: > > gcc/ChangeLog: > > * builtins.def (BUILT_IN_ANALYZER_BREAK): New builtin. > > (BUILT_IN_ANALYZER_DUMP): New builtin. > > (BUILT_IN_ANALYZER_DUMP_EXPLODED_NODES):

Re: [PATCH 16/45] analyzer: new builtins

2019-12-13 Thread Jakub Jelinek
On Fri, Dec 13, 2019 at 01:11:05PM -0500, David Malcolm wrote: > gcc/ChangeLog: > * builtins.def (BUILT_IN_ANALYZER_BREAK): New builtin. > (BUILT_IN_ANALYZER_DUMP): New builtin. > (BUILT_IN_ANALYZER_DUMP_EXPLODED_NODES): New builtin. > (BUILT_IN_ANALYZER_DUMP_NUM_HEAP_REGION

[PATCH 33/45] analyzer: new file: sm-signal.cc

2019-12-13 Thread David Malcolm
New in v4; part of: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00214.html with various fixups gcc/ChangeLog: * analyzer/sm-signal.cc: New file. --- gcc/analyzer/sm-signal.cc | 306 ++ 1 file changed, 306 insertions(+) create mode 100644 gcc/analyz

[PATCH 35/45] analyzer: new files: analysis-plan.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Use TV_ANALYZER_PLAN rather than an auto_client_timevar. - Update for new param API. - Add DISABLE_COPY_AND_ASSIGN (analysis_plan); This patch adds an analysis_plan class, wh

[PATCH 31/45] analyzer: new file: sm-pattern-test.cc

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Rework on_leak vfunc: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02028.html This patch adds a custom state machine checker intended purely f

[PATCH 38/45] analyzer: new files: program-state.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Add support for global state: - https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00217.html - Rework logging to avoid exploded_graph multiple-inherit

[PATCH 30/45] analyzer: new file: sm-file.cc

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Rework on_leak vfunc: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02028.html - Rework for changes to is_named_call_p, resolving function point

[PATCH 25/45] analyzer: new files: constraint-manager.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines This patch adds classes for tracking the equivalence classes and constraints that hold at a point on an execution path. gcc/ChangeLog: * ana

[PATCH 21/45] analyzer: new files: digraph.{cc|h} and shortest-paths.h

2019-12-13 Thread David Malcolm
Changed in v4: - Moved from gcc/analyzer to gcc, renaming selftests accordingly - Remove comments - Replace auto_client_timevar with TV_ANALYZER_SHORTEST_PATHS This patch adds template classes for directed graphs, their nodes and edges, and for finding the shortest path through such a g

[PATCH 43/45] analyzer: new files: diagnostic-manager.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Add custom events: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00213.html - Generalize rewind_info_t to exploded_edge::custom_info_t https

[PATCH 41/45] analyzer: new files: engine.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Rework logging to avoid exploded_graph multiple-inheritance (moving log_user base to a member) - Support resolving function pointers: https://g

[PATCH 44/45] gdbinit.in: add break-on-saved-diagnostic

2019-12-13 Thread David Malcolm
This patch adds a "break-on-saved-diagnostic" command to gdbinit.in, useful for debugging when a diagnostic is queued by the analyzer. gcc/ChangeLog: * gdbinit.in (break-on-saved-diagnostic): New command. --- gcc/gdbinit.in | 10 ++ 1 file changed, 10 insertions(+) diff --git a/g

[PATCH 40/45] analyzer: new files: state-purge.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Use TV_ANALYZER_STATE_PURGE rather than an auto_client_timevar - Fix .dot output: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02461.html - Add

[PATCH 42/45] analyzer: new files: checker-path.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Add custom events: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00213.html - Add support for global state: https://gcc.gnu.org/ml/gcc-patch

[PATCH 39/45] analyzer: new file: exploded-graph.h

2019-12-13 Thread David Malcolm
Changed in v4: - Remove /// comment lines - Don't use multiple inheritance, instead adding a log_user member. - Add more validation, part of: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02517.html - Generalize rewind_info_t to exploded_edge::custom_info_t https://gcc.gnu.org/ml/gcc-patche

[PATCH 34/45] analyzer: new file: sm-taint.cc

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Rework on_leak vfunc: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02028.html - Rework for changes to is_named_call_p, resolving function point

[PATCH 36/45] analyzer: new files: call-string.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Add call_string::validate, part of: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02517.html This patch adds call_string, a class for representing the call stacks at a pr

[PATCH 37/45] analyzer: new files: program-point.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Add support for more validation, part of: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02517.html - Rework logging to avoid exploded_graph mult

[PATCH 32/45] analyzer: new file: sm-sensitive.cc

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Rework on_leak vfunc: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02028.html - Rework for changes to is_named_call_p, resolving function point

[PATCH 10/45] Add diagnostic paths

2019-12-13 Thread David Malcolm
Changed in v4: - Add support for paths for signal-handlers: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00215.html - Fix comment Changed in v3: - Fixup for rebase (r278634): c-format.c: get_pointer_to_named_type -> get_named_type https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00530.html C

[PATCH 29/45] analyzer: new files: sm-malloc.cc and sm-malloc.dot

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Rework on_leak vfunc: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02028.html - Rework for changes to is_named_call_p, resolving function point

[PATCH 27/45] analyzer: new files: pending-diagnostic.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Capture const state_change_event& in evdesc_state_change: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00218.html This patch adds classes used by the analyzer for handli

[PATCH 24/45] analyzer: new files: tristate.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - moved from gcc/analyzer to gcc gcc/ChangeLog: * tristate.cc: New file. * tristate.h: New file. --- gcc/tristate.cc | 221 gcc/tristate.h | 82 ++ 2 files changed, 303 insertions(+) create mode 100

[PATCH 22/45] analyzer: new files: supergraph.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Rework includes to avoid gcc-plugin.h - Wrap everything with #if ENABLE_ANALYZER - Replace auto_client_timevar with TV_ANALYZER_SUPERGRAPH - Fix .dot output https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02461.html - Update for move of digraph.h This patch adds a "supergraph" cla

[PATCH 28/45] analyzer: new files: sm.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Add call to make_signal_state_machine: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00214.html - Rework on_leak vfunc: https://gcc.gnu.org/

[PATCH 20/45] analyzer: new files: graphviz.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v3: - https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02461.html - moved from gcc/analyzer to gcc This patch adds a simple wrapper class to make it easier to write human-readable .dot files. gcc/ChangeLog: * graphviz.cc: New file. * graphviz.h: New file. --- gcc/graphviz

[PATCH 23/45] analyzer: new files: analyzer.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Wrap everything in #if ENABLE_ANALYZER - Remove /// comment lines - Update is_named_call_p to support function pointers: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00178.html gcc/ChangeLog: * analyzer

[PATCH 15/45] analyzer: new files: analyzer-selftests.{cc|h}

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h - call run_analyzer_selftests directly, rather than via plugin registration; wrap the analyzer selftests in #if ENABLE_ANALYZER - fixup for moves of digraph.cc and tristate.cc from gcc/analyzer to gcc gcc/ChangeLog: * analyzer/analyzer-self

[PATCH 11/45] Add ordered_hash_map

2019-12-13 Thread David Malcolm
This patch adds an ordered_hash_map template, which is similar to hash_map, but preserves insertion order. gcc/ChangeLog: * Makefile.in (OBJS): Add ordered-hash-map-tests.o. * ordered-hash-map-tests.cc: New file. * ordered-hash-map.h: New file. * selftest-run-tests.

[PATCH 18/45] analyzer: logging support

2019-12-13 Thread David Malcolm
Changed in v4: - wrap with #if ENABLE_ANALYZER - add DISABLE_COPY_AND_ASSIGN This patch adds a logging framework to the analyzer which handles hierarchical messages (showing the nested structure of the calls). This code is largely based on that in the "jit" subdirectory (with a few changes). An

[PATCH 17/45] analyzer: command-line options

2019-12-13 Thread David Malcolm
Changed in v4: - Renamed gcc/analyzer/plugin.opt to gcc/analyzer/analyzer.opt - Change option from -analyzer to -fanalyzer, changed it from Driver to Common. - Various commits on 2019-11-12 including r278083 through r278087 reimplemented parameter-handling in terms of options, so that param

[PATCH 19/45] analyzer: new file: analyzer-pass.cc and pass registration

2019-12-13 Thread David Malcolm
Changed in v4: - Remove include of gcc-plugin.h, reworking includes accordingly. - Use TV_ANALYZER rather than TV_NONE for the pass - Add a gate function to the pass - Move the check for #if ENABLE_ANALYZER from the driver to the pass's execute vfunc - Expose the pass via make_pass_analyzer, rath

[PATCH 00/45] v4 of analyzer patch kit

2019-12-13 Thread David Malcolm
Here's an updated version of the patch kit, addressing many issues from review, and squashing in other changes. This is v4, and is relative to r279310 (2019-12-12) Earlier versions: v3: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00529.html v2: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02024

[PATCH 16/45] analyzer: new builtins

2019-12-13 Thread David Malcolm
gcc/ChangeLog: * builtins.def (BUILT_IN_ANALYZER_BREAK): New builtin. (BUILT_IN_ANALYZER_DUMP): New builtin. (BUILT_IN_ANALYZER_DUMP_EXPLODED_NODES): New builtin. (BUILT_IN_ANALYZER_DUMP_NUM_HEAP_REGIONS): New builtin. (BUILT_IN_ANALYZER_DUMP_PATH): New built

[PATCH 14/45] analyzer: add new files to Makefile.in

2019-12-13 Thread David Malcolm
gcc/ChangeLog: * Makefile.in (lang_opt_files): Add analyzer.opt. (ANALYZER_OBJS): New. (OBJS): Add digraph.o, graphviz.o, tristate.o and ANALYZER_OBJS. --- gcc/Makefile.in | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/g

[PATCH 13/45] analyzer: changes to configure.ac

2019-12-13 Thread David Malcolm
This patch adds a configuration option to disable building the analyzer. It is built by default (but off by default at compile-time). gcc/ChangeLog: * configure.ac (--disable-analyzer, ENABLE_ANALYZER): New option. (gccdepdir): Also create depdir for "analyzer" subdir. --- gcc/con

[PATCH 04/45] analyzer: internal documentation

2019-12-13 Thread David Malcolm
Changed in v4: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02026.html gcc/ChangeLog: * Makefile.in (TEXI_GCCINT_FILES): Add analyzer.texi. * doc/analyzer.texi: New file. * doc/gccint.texi ("Static Analyzer") New menu item. (analyzer.texi): Include it. --- gcc/M

[PATCH 05/45] Add pp_write_text_as_html_like_dot_to_stream

2019-12-13 Thread David Malcolm
gcc/ChangeLog: * pretty-print.c (pp_write_text_as_html_like_dot_to_stream): New function. * pretty-print.h (pp_write_text_as_html_like_dot_to_stream): New decl. --- gcc/pretty-print.c | 48 ++ gcc/pretty-print.h | 3 +++ 2 files

[PATCH 12/45] timevar.def: add TVs for analyzer

2019-12-13 Thread David Malcolm
This takes the place of the auto_client_timevar code from v1 of the kit: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01519.html gcc/ChangeLog: * timevar.def (TV_ANALYZER): New timevar. (TV_ANALYZER_SUPERGRAPH): Likewise. (TV_ANALYZER_STATE_PURGE): Likewise. (TV_

[PATCH 09/45] Add diagnostic_metadata and CWE support

2019-12-13 Thread David Malcolm
Changed in v2: fixup for json::number -> json::integer_number change (r277284) https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02027.html This patch adds support for associating a diagnostic with an optional diagnostic_metadata object, so that plugins can add extra data to their diagnostics (e

[PATCH 08/45] Add -fdiagnostics-nn-line-numbers

2019-12-13 Thread David Malcolm
This patch implements -fdiagnostics-nn-line-numbers, a new option which makes diagnostic_show_locus print "NN" rather than specific line numbers when printing the left margin. This is intended purely to make it easier to write certain kinds of DejaGnu test; various integration tests for diagnostic

[PATCH 03/45] analyzer: user-facing documentation

2019-12-13 Thread David Malcolm
Changed in v4: - Use -fanalyzer rather than --analyzer - Add -W[no-]analyzer-unsafe-call-within-signal-handler gcc/ChangeLog: * doc/invoke.texi ("Static Analyzer Options"): New list and new section. ("Warning Options"): Add static analysis warnings to the list. (-Wno-analyz

[PATCH 01/45] gimple const-correctness fixes

2019-12-13 Thread David Malcolm
This patch converts various "gimple *" to "const gimple *" and similar fixes for gimple subclasses, adding is_a_helper for gimple subclasses to support the const form of as_a, and adding a few "const" overloads of accessors. This is enough to make pp_gimple_stmt_1's stmt const. gcc/ChangeLog:

[PATCH 07/45] vec.h: add auto_delete_vec

2019-12-13 Thread David Malcolm
Changed in v4: added DISABLE_COPY_AND_ASSIGN This patch adds a class auto_delete_vec, a subclass of auto_vec that deletes all of its elements on destruction; it's used in many places later in the kit. This is a crude way for a vec to "own" the objects it points to and clean up automatically (ess

[PATCH 06/45] sbitmap.h: add operator const sbitmap & to auto_sbitmap

2019-12-13 Thread David Malcolm
gcc/ChangeLog: * sbitmap.h (auto_sbitmap): Add operator const sbitmap &. --- gcc/sbitmap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/sbitmap.h b/gcc/sbitmap.h index a33175d26f75..3c5b0a47a004 100644 --- a/gcc/sbitmap.h +++ b/gcc/sbitmap.h @@ -295,6 +295,7 @@ public: /* A

[PATCH 02/45] hash-map-tests.c: add a selftest involving int_hash

2019-12-13 Thread David Malcolm
gcc/ChangeLog: * hash-map-tests.c (selftest::test_map_of_int_to_strings): New selftest. (selftest::hash_map_tests_c_tests): Call it. --- gcc/hash-map-tests.c | 41 + 1 file changed, 41 insertions(+) diff --git a/gcc/hash-map-tests.c

Re: [PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Segher Boessenkool
Hi! On Fri, Dec 13, 2019 at 05:25:41PM +0100, Stefan Franke wrote: > I suggest this patch to allow architectures do substitute cc0_rtx with a > generated cc register. > > Why? If you are using a cc register plus your architecture as many > instructions which may clobber that cc register, some p

[patch] Let libstdc++ know that VxWorks has_nanosleep

2019-12-13 Thread Olivier Hainque
This change adjusts the libstdc++ configuration for VxWorks to set ac_has_nanosleep=yes, which enables the use of nanosleep from the library. While this technically depends on the kernel configuration (INCLUDE_POSIX_TIMERS) this is the normal configuration in all the environments we have been giv

Re: [patch, openacc] Adjust tests for amdgcn offloading

2019-12-13 Thread Andrew Stubbs
On 19/11/2019 12:21, Andrew Stubbs wrote: This patch adds GCN special casing for most of the OpenACC libgomp tests that require it. It also disables one testcase that explicitly uses CUDA. The patches aren't all that controversial, should only change the results on amdgcn, and Tobias already w

Re: [PATCH 11/49] Add diagnostic_metadata and CWE support

2019-12-13 Thread David Malcolm
On Fri, 2019-12-13 at 09:43 -0700, Martin Sebor wrote: > On 12/12/19 7:59 PM, David Malcolm wrote: > > On Wed, 2019-12-04 at 10:36 -0700, Martin Sebor wrote: > > > On 11/15/19 6:22 PM, David Malcolm wrote: > > > > This patch adds support for associating a diagnostic with an > > > > optional > > > >

[patch] Adapt libstdc++ os_defines for VxWorks to more recent versions

2019-12-13 Thread Olivier Hainque
Hello, This change reworks the VxWorks specific os_defines.h internal lisbstdc++ header to help fix build and runtime failures of various kinds in environments from 6.4/6.9 to 7 SR640, based on experiments and observations conducted against real installs of these OSes for different CPU architectur

[patch] Arrange to preinclude yvals.h ahead of stdint on VxWorks 7

2019-12-13 Thread Olivier Hainque
On Vxworks 7, includers of stdint.h (which we currently "provide") need yvals.h to have been included ahead. Instead of altering the common stdint-gcc.h with unpleasant vxworks specific bits to do that, we arrange to provide stdint-gcc.h on its own along with a stdint.h wrapper which preincludes

Re: [PATCH 11/49] Add diagnostic_metadata and CWE support

2019-12-13 Thread Martin Sebor
On 12/12/19 7:59 PM, David Malcolm wrote: On Wed, 2019-12-04 at 10:36 -0700, Martin Sebor wrote: On 11/15/19 6:22 PM, David Malcolm wrote: This patch adds support for associating a diagnostic with an optional diagnostic_metadata object, so that plugins can add extra data to their diagnostics (e

[committed, amdgcn] Add sub-dword vector multiply

2019-12-13 Thread Andrew Stubbs
I've committed this patch to add v64qi and v64hi multiply patterns. This is slowly working toward full char and short vectorization. Andrew Sub-dword vector multiply for amdgcn 2019-12-13 Andrew Stubbs gcc/ * config/gcn/gcn-valu.md (mulv64si3): Rename to ... (mul3): ... this, and impleme

[patch] Setup system header wrappers for C++ on VxWorks

2019-12-13 Thread Olivier Hainque
Starting from VxWorks 7, the system comes with a Dinkumware environment which requires the inclusion of "yvals.h" before other system headers. We provide wrapped versions of a few headers to accommodate such constraints. Initially proposed by Jérôme, this helps fix dozens of build issues whe

[PATCH, c] all plattforms: support using a CC_REG instead cc0_rtx

2019-12-13 Thread Stefan Franke
Hi there, I suggest this patch to allow architectures do substitute cc0_rtx with a generated cc register. Why? If you are using a cc register plus your architecture as many instructions which may clobber that cc register, some passes (e.g. gcse) will reorder the insns. This can lead to the s

[patch] Introduce an internal API for VxWorks version checks

2019-12-13 Thread Olivier Hainque
This changes introduces an internal API for VxWorks version checks within runtime files, a prerequisite to a few fixes coming up for libstdc++ builds on more recent versions of the OS. Tested in accordance with the description in https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00911.html Committin

[patch] Simplify the compilation commands for config/vxworks.c

2019-12-13 Thread Olivier Hainque
The patch by Joel setting up TARGET_C_PREINCLUDE exposed a possibility to simplify/robustify the compilation commands use for another source in the t-vxworks Makefile fragment. We now leverage $(COMPILE) and $(POSTCOMPILE) instead of replicating them manually for vxworks.c. Tested in accordance

[patch] Setup TARGET_C_PREINCLUDE for VxWorks

2019-12-13 Thread Olivier Hainque
This patch modifies the C & C++ VxWorks compiler to predefine the __STDC_ macros verified by gcc.dg/c99-predef-1.c in the testsuite. We setup a vxworks-predef.h header file which arranges to define TARGET_C_PREINCLUDE, in a separate config/vxworks directory where other runtime header files will

[patch] Refine definitions for wchar_t/wint_t on VxWorks

2019-12-13 Thread Olivier Hainque
This change refines the VxWorks macro definitions configuring wchar_t to accommodate the VxWorks7 environment, where wchar_t is now typically a 32bit type. We also ensure that the definitions for wint_t are always based on those for wchar_t, so the two remain in sync in environments where WCHAR_T

[patch] Identify sections in vx-common.h

2019-12-13 Thread Olivier Hainque
This patch simply adds sectioning comments in vx-common.h and moves the NO_DOLLAR/DOT_IN_LABEL block down, away from the section now dedicated to SPEC strings. Goal to improve readability and facilitate future changes to come. Tested in accordance with the description in https://gcc.gnu.org/ml/gc

Fix merging of common target infos

2019-12-13 Thread Jan Hubicka
Hi, while looking into Firefox regression compared to gcc9 I noticed that we often confuse common target infos when profiles get merged. This patch adds the missing update bits. Honza * ipa-utils.c (ipa_merge_profiles): Improve dumping; merge common targets. Index: ipa-utils.c =

[committed, amdgcn] Add sub-dword vector extend and truncate insns

2019-12-13 Thread Andrew Stubbs
I've committed the attached patch to add extend, zero_extend, and trunc instructions patterns to, from and between the v64qi and v64hi modes. The patch adds both normal and the masked "exec" variants of the patterns, as per the rest of the machine description. The FP conversions also had to b

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Segher Boessenkool
On Sat, Dec 14, 2019 at 12:06:36AM +0900, Oleg Endo wrote: > On Fri, 2019-12-13 at 15:57 +0100, John Paul Adrian Glaubitz wrote: > > Hello Segher! Hi :-) > > > With LRA, sh builds fine (with the combine2 patches). I have no idea > > > if correct code is generated, but it doesn't ICE anymore. > >

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Richard Sandiford
John Paul Adrian Glaubitz writes: > Hi! > > On 12/13/19 4:06 PM, Oleg Endo wrote: >>> What are the combine2 patches? >> >> See the other thread that I've linked in my message. > > I don't see any patch there. The latest version is: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00287.html Origina

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Oleg Endo
On Fri, 2019-12-13 at 16:09 +0100, John Paul Adrian Glaubitz wrote: > Hi! > > On 12/13/19 4:06 PM, Oleg Endo wrote: > > > What are the combine2 patches? > > > > See the other thread that I've linked in my message. > > I don't see any patch there. You'd have to crawl up the discussion or so. And

'find_group_last' (was: [PATCH] OpenACC reference count overhaul)

2019-12-13 Thread Thomas Schwinge
Hi Julian! On 2019-10-29T12:15:01+, Julian Brown wrote: > On Mon, 21 Oct 2019 16:14:11 +0200 > Thomas Schwinge wrote: > >> On 2019-10-03T09:35:04-0700, Julian Brown >> wrote: >> > --- a/libgomp/oacc-parallel.c >> > +++ b/libgomp/oacc-parallel.c >> > @@ -56,12 +56,29 @@ find_pointer (int pos

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread John Paul Adrian Glaubitz
Hi! On 12/13/19 4:06 PM, Oleg Endo wrote: >> What are the combine2 patches? > > See the other thread that I've linked in my message. I don't see any patch there. >> And I would support switching SH to LRA as >> there are a few cases (Debian packages) where GCC fails with an internal >> compile

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Jeff Law
On Fri, 2019-12-13 at 05:03 -0600, Segher Boessenkool wrote: > On Thu, Dec 12, 2019 at 09:32:27AM +, Richard Sandiford wrote: > > I doubt it will be long before we deprecate > > all targets that require old reload.) > > Do we wait until GCC 12 (to remove old reload completely)? If not, we > s

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Oleg Endo
On Fri, 2019-12-13 at 15:57 +0100, John Paul Adrian Glaubitz wrote: > Hello Segher! > > > With LRA, sh builds fine (with the combine2 patches). I have no idea > > if correct code is generated, but it doesn't ICE anymore. > > What are the combine2 patches? See the other thread that I've linked i

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread John Paul Adrian Glaubitz
Hello Segher! > With LRA, sh builds fine (with the combine2 patches). I have no idea > if correct code is generated, but it doesn't ICE anymore. What are the combine2 patches? And I would support switching SH to LRA as there are a few cases (Debian packages) where GCC fails with an internal comp

Re: [PATCH, OpenACC] Fix potential race condition in OpenACC "exit data" operations

2019-12-13 Thread Thomas Schwinge
Hi Julian! On 2019-12-12T19:01:21+, Julian Brown wrote: > This is a fix for PR92881, broken out of the larger "reference counting > overhaul" patch last posted here: > > https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02235.html Thanks! > The current implementation (potentially with synchrono

[LTO] PR 86416 – improve lto1 diagnostic if a mode does not exist (esp. for offloading targets)

2019-12-13 Thread Tobias Burnus
As long as one compiles for a single target, the message is unlikely to appear. However, when compiling for offloading, the modes supported on the target 'host' and on the target 'device' can be different. In particular, 'long double' (when larger than double) and '__float128' might not be availa

[patch] Define STARTFILE_PREFIX_SPEC for powerpc VxWorks < 7

2019-12-13 Thread Olivier Hainque
Prior to VxWorks 7, the path where startfiles and core libraries are located contains CPU architecture specific name components. This should normally be expressed through a CPU specific STARTFILE_PREFIX_SPEC for such versions of VxWorks. This change adds a definition for the PowerPc family, which

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Oleg Endo
On Fri, 2019-12-13 at 08:09 -0600, Segher Boessenkool wrote: > On Fri, Dec 13, 2019 at 10:06:20PM +0900, Oleg Endo wrote: > > On Fri, 2019-12-13 at 05:03 -0600, Segher Boessenkool wrote: > > > On Thu, Dec 12, 2019 at 09:32:27AM +, Richard Sandiford > > > wrote: > > > > I doubt it will be long b

[OpenACC] Elaborate/simplify 'exit data' 'finalize' handling (was: [OpenACC] Update OpenACC data clause semantics to the 2.5 behavior)

2019-12-13 Thread Thomas Schwinge
Hi! Julian, Tobias, regarding the following OpenACC 'exit data' 'finalize' handling: On 2018-05-25T13:01:58-0700, Cesar Philippidis wrote: > --- a/gcc/gimplify.c > +++ b/gcc/gimplify.c > @@ -10859,6 +10849,53 @@ gimplify_omp_target_update (tree *expr_p, gimple_seq > *pre_p) > + else if (TREE

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Segher Boessenkool
On Fri, Dec 13, 2019 at 01:19:55PM +0100, Richard Biener wrote: > On December 13, 2019 12:03:30 PM GMT+01:00, Segher Boessenkool > wrote: > >On Thu, Dec 12, 2019 at 09:32:27AM +, Richard Sandiford wrote: > >> I doubt it will be long before we deprecate > >> all targets that require old reload

Re: AW: [PATCH] m68k architecture: support ccmode + lra

2019-12-13 Thread Segher Boessenkool
On Fri, Dec 13, 2019 at 10:06:20PM +0900, Oleg Endo wrote: > On Fri, 2019-12-13 at 05:03 -0600, Segher Boessenkool wrote: > > On Thu, Dec 12, 2019 at 09:32:27AM +, Richard Sandiford wrote: > > > I doubt it will be long before we deprecate > > > all targets that require old reload.) > > > > Do

[patch] Improve recursion protection for VxWorks limits.h

2019-12-13 Thread Olivier Hainque
This change fixes latent failures actually observed when activating libstdc++ for VxWorks on aarch46 VxWorks 7 and powerpc VxWorks 6. The system limits.h is dated on some configurations, so we provide our own version to expose constants required by more recent C standards. Our versio

[patch] Improve VxWorks GTHREAD_ONCE_INIT

2019-12-13 Thread Olivier Hainque
This change improves the GTHREAD_ONCE_INIT initializer exposed by gthr-vxworks.h to use a more standard syntax for a zero-initialization, which fixes build failures observed when activating libstdc++ builds for aarch64-vxworks. Tested in accordance with the description in https://gcc.gnu.org/ml/g

[patch] Fix macro reference in gthr-vxworks-tls.c

2019-12-13 Thread Olivier Hainque
This change fixes a typo in a macro name reference, introduced by mistake during a refactoring. Tested in accordance with the description in https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00911.html Committing to mainline. Olivier 2019-12-13 Olivier Hainque libgcc/ * con

[patch] Fix typo in macro name guarding conditional in vxcrtstuff.c

2019-12-13 Thread Olivier Hainque
Hello, This patch fixes an obvious typo in a macro name used to guard some definitions used later on in vxcrtstuff.c, leading to an unexpected mix of symbols in a vxcrtbegin variant and incorrect behavior for the corresponding mode at run time. Tested in accordance with the description in https:/

Re: Add a compatible_vector_types_p target hook

2019-12-13 Thread Richard Sandiford
Richard Biener writes: >>> The frontend are in charge of specifying the actual argument type and >>> at that point the target may fix the ABI. The ABI can be recorded in >>> the calls fntype, either via its TYPE_ARG_TYPES or in more awkward >>> ways for varargs functions (in full generality that w

Re: [testsuite][arm] Remove xfail for vect-epilogues test

2019-12-13 Thread Andre Vieira (lists)
Consequently whilst looking at the list I noticed these two were missing. This OK for trunk? gcc/ChangeLog: 2019-12-13 Andre Vieira * doc/sourcebuild.texi (arm_little_endian, arm_nothumb): Documented existing target checks. On 13/12/2019 13:05, Andre Vieira (lists) wrote: Th

  1   2   >