On Tue, 2023-08-15 at 14:15 -0400, Lewis Hyatt wrote:
> On Tue, Aug 15, 2023 at 12:15:15PM -0400, David Malcolm wrote:
> > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> > > This patch enhances location_get_source_line(), which is the
> > > primary
>
On Tue, 2023-08-15 at 13:58 -0400, Lewis Hyatt wrote:
> On Tue, Aug 15, 2023 at 11:43:05AM -0400, David Malcolm wrote:
> > On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> > > Class file_cache_slot in input.cc is used to query specific lines
> > > of source
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> The diagnostics routines for SARIF output need to read the source code back
> in, so that they can generate "snippet" and "content" records, so they need to
> be able to cope with generated data locations. Add support for that in
> diagnostic
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> Previous patches in this series have laid the groundwork for supporting
> source code locations in memory ("generated data") rather than ordinary
> files. This patch completes the support by adding awareness of such
> locations to all places t
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> Add selftests for the new capabilities in input.cc related to source code
> locations that are stored in memory rather than ordinary files.
>
> gcc/ChangeLog:
>
> * input.cc (temp_source_file::do_linemap_add): New function.
>
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> This patch enhances location_get_source_line(), which is the primary
> interface provided by the diagnostics infrastructure to obtain the line of
> source code corresponding to a given location, so that it understands
> generated data location
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> Class file_cache_slot in input.cc is used to query specific lines of source
> code from a file when needed by diagnostics infrastructure. This will be
> extended in a subsequent patch to support obtaining the source code from
> in-memory gener
On Mon, 2023-08-14 at 17:48 +0200, priour...@gmail.com wrote:
> From: benjamin priour
>
> Plenty useful, thanks David. I've adjusted some few things, especially
> the artifacts of earlier versions I missed when building the commit.
>
> I didn't how to test for warnings within , I couldn't figure
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
> The previous patch in this series introduced the concept of LC_GEN line
> maps. This patch continues on the path to using them to improve _Pragma
> diagnostics, by adding a new source_id SRC member to struct
> expanded_location, which is popul
On Wed, 2023-08-09 at 18:14 -0400, Lewis Hyatt wrote:
Hi Lewis, thanks for the patch...
> Add a new linemap reason LC_GEN which enables encoding the location of data
> that was generated during compilation and does not appear in any source file.
> There could be many use cases, such as, for insta
This patch adds new functions to the analyzer for checking that
an argument at a callsite is a pointer to a valid null-terminated
string, and uses this for the following known functions:
- error (param 3, the format string)
- error_at_line (param 5, the format string)
- putenv
- strchr (1st param)
On Fri, 2023-08-11 at 13:51 +0200, priour...@gmail.com wrote:
> From: benjamin priour
Hi Benjamin, thanks for the patch.
Overall, the patch is close to being ready, but see the various
comments inline below...
>
> This patch introduces -fanalyzer-show-events-in-system-headers,
> disabled by de
On Wed, 2023-08-09 at 15:22 -0400, Eric Feng wrote:
> Thank you for your help in getting dg-require-python-h working! I can
> confirm that the FAILs are related to differences between the --
> cflags
> affecting the gimple seen by the analyzer. For this reason, I have
> changed it to --includes for
On Tue, 2023-08-08 at 15:01 +, Christophe Lyon wrote:
> For 32-bit newlib targets (e.g. arm-eabi) int32_t is "long int".
>
> Like previous patches in these tests, update the matching regexps to
> match "aka (long )?int".
>
> Tested on arm-eabi and aarch64-linux-gnu.
Sorry about this breakag
Previously, the code for simulating calls to external functions in
region_model::on_call_pre wrote a default svalue to the LHS of the
call statement, which could be further overwritten by known_function
subclasses.
Unfortunately, this led to messy hacks, such as when the default svalue
was an allo
On Tue, 2023-08-08 at 08:05 +0200, Richard Biener wrote:
> On Mon, Aug 7, 2023 at 9:04 PM Bradley Lucier
> wrote:
> >
> > Thank you for your comments. I have a few questions.
> >
> > > I don't think this specific case qualifies for -Wdisabled-
> > > optimization.
> > > The diagnostic is for cas
On Tue, 2023-08-08 at 09:33 -0400, Paul Koning via Gcc-patches wrote:
>
>
> > On Aug 8, 2023, at 9:01 AM, Jakub Jelinek via Gcc-patches
> > wrote:
> >
> > On Tue, Aug 08, 2023 at 02:52:57PM +0200, Richard Biener via Gcc-
> > patches wrote:
> > > There's probably external tools to do this, not s
On Sun, 2023-08-06 at 02:28 +0530, Prathamesh Kulkarni via Gcc-patches
wrote:
> On Fri, 4 Aug 2023 at 23:28, Bradley Lucier via Gcc-patches
> wrote:
Hi Bradley and Prathamesh...
> >
> > The patch at the end adds a warning when a tail/sibling call cannot
> > be
> > optimized for various reasons.
This patch makes -fanalyzer make use of the function attribute
"alloc_size", allowing -fanalyzer to emit -Wanalyzer-allocation-size,
-Wanalyzer-out-of-bounds, and -Wanalyzer-tainted-allocation-size on
execution paths involving allocations using such functions.
Successfully bootstrapped & regrteste
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-3000-g187b213ddbe7ea.
gcc/analyzer/ChangeLog:
* svalue.cc (region_svalue::dump_to_pp): Support NULL type.
(constant_svalue::dump_to_pp): Likewise.
(initial_svalue::dump_to_pp): Likewise.
On Thu, 2023-08-03 at 11:28 -0400, Eric Feng wrote:
> On Wed, Aug 2, 2023 at 5:09 PM David Malcolm
> wrote:
> >
> > On Wed, 2023-08-02 at 14:46 -0400, Eric Feng wrote:
> >
[...snip...]
> >
> > > Otherwise, please let me know if I should request write
On Thu, 2023-08-03 at 15:54 +0100, Matthew Malcomson wrote:
> On 8/3/23 15:09, David Malcolm wrote:
> >
> > Hi Matthew. I recently touched the timevar code (in r14-2881-
> > g75d623946d4b6e) to add support for serializing the timevar data in
> > JSON form as part of th
The ICE in PR analyzer/108171 appears to be a dup of the recently fixed
PR analyzer/110882 and is likewise fixed by it; adding this test case.
Successfully regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-2957-gf80efa49b7a163.
gcc/testsuite/ChangeLog:
PR analyzer/108171
On Thu, 2023-08-03 at 14:38 +0100, Matthew Malcomson via Gcc-patches
wrote:
> >
> > I think this is undesriable. With fused you mean we use FMA?
> > I think you could use -ffp-contract=off for the TU instead.
> >
> > Note you can't use __attribute__((noinline)) literally since the
> > host compi
Successfully bootstrapped and regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-2955-gc62f93d1e0383d.
gcc/analyzer/ChangeLog:
PR analyzer/110882
* region.cc (int_size_in_bits): Fail on zero-sized types.
gcc/testsuite/ChangeLog:
PR analyzer/110882
* gcc.dg/
On Wed, 2023-08-02 at 14:46 -0400, Eric Feng wrote:
> On Wed, Aug 2, 2023 at 1:20 PM Marek Polacek
> wrote:
> >
> > On Wed, Aug 02, 2023 at 12:59:28PM -0400, David Malcolm wrote:
> > > On Wed, 2023-08-02 at 12:20 -0400, Eric Feng wrote:
> > >
[Dropping Jos
On Wed, 2023-08-02 at 12:20 -0400, Eric Feng wrote:
Hi Eric, thanks for the updated patch.
Overall, looks good to me, although I'd drop the "Exited." from the
"sorry" message (and thus from the dg-message directive), since the
compiler is not exiting, it's just the particular plugin that's giving
On Tue, 2023-08-01 at 09:52 -0400, Eric Feng wrote:
> Hi all,
>
> This patch adds a hook to the end of ana::on_finish_translation_unit
> which calls relevant stashing-related callbacks registered during
> plugin
> initialization. This feature is used to stash named types and global
> variables for
On Mon, 2023-07-31 at 13:46 +0200, Benjamin Priour wrote:
> Hi Dave,
>
> On Fri, Jul 21, 2023 at 10:10 PM David Malcolm
> wrote:
[...snip...]
> >
> > I see that we have test coverage for:
> > noexcept-new.C: -fno-exceptions with new vs nothrow-new
> > wh
On Sat, 2023-07-29 at 10:27 -0400, Lewis Hyatt wrote:
> On Fri, Jul 28, 2023 at 6:22 PM David Malcolm
> wrote:
> >
> > On Fri, 2023-07-21 at 19:08 -0400, Lewis Hyatt wrote:
> > > Hello-
> > >
> > > This is an update to the v2 patch series la
On Fri, 2023-07-21 at 19:08 -0400, Lewis Hyatt wrote:
> Add a new linemap reason LC_GEN which enables encoding the location
> of data
> that was generated during compilation and does not appear in any
> source file.
> There could be many use cases, such as, for instance, referring to
> the content
On Fri, 2023-07-21 at 19:08 -0400, Lewis Hyatt wrote:
> Hello-
>
> This is an update to the v2 patch series last sent in January:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609473.html
>
> While I did not receive any feedback on the v2 patches yet, they did
> need some
> rebasing on
On Fri, 2023-07-28 at 08:00 +0200, Richard Biener wrote:
> On Fri, Jul 28, 2023 at 12:23 AM David Malcolm via Gcc-patches
> wrote:
> >
> > On Tue, 2023-04-11 at 08:43 +, Richard Biener wrote:
> > > On Tue, 4 Apr 2023, David Malcolm wrote:
> > >
>
On Tue, 2023-04-11 at 08:43 +, Richard Biener wrote:
> On Tue, 4 Apr 2023, David Malcolm wrote:
>
> > Richi, Jakub: I can probably self-approve this, but it's
> > technically a
> > new feature. OK if I push this to trunk in stage 4? I believe
> > it
This patch introduces a "symbol" base class that region and svalue
both inherit from, generalizing the ID from the region class so it's
also used by svalues. This gives a way of sorting regions and svalues
into creation order, which I've found useful in my experiments with
adding SMT support (PR a
On Wed, 2023-07-26 at 11:27 +0200, Benjamin Priour wrote:
> On Sat, Jul 22, 2023 at 12:04 AM David Malcolm
> wrote:
>
> > On Fri, 2023-07-21 at 17:35 +0200, Benjamin Priour wrote:
> > > Hi,
> > >
> > > Upon David's request I've joined
-- Forwarded message -
> From: Benjamin Priour
> Date: Tue, Jul 18, 2023 at 3:30 PM
> Subject: [RFC] analyzer: Add optional trim of the analyzer
> diagnostics
> going too deep [PR110543]
> To: , David Malcolm
>
>
> Hi,
>
> I'd like to reque
On Thu, 2023-07-06 at 16:43 +0200, priour...@gmail.com wrote:
> As per David's suggestion.
> - Improved leading comment of "is_placement_new_p"
> - "kf_operator_new::matches_call_types_p" now checks that arg 0 is of
> integral type and that arg 1, if any, is of pointer type.
> - Changed ambiguous
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-2689-g7006f02bbc3f1d.
gcc/analyzer/ChangeLog:
PR analyzer/110433
PR middle-end/110612
* access-diagram.cc (class spatial_item): Add virtual dtor.
gcc/ChangeLog:
PR middle-end/110
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-2690-ga4913a19d24a79.
gcc/analyzer/ChangeLog:
PR analyzer/110455
* region-model.cc (region_model::get_gassign_result): Only check
for bad shift counts when dealing with an integral type.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-2688-g5a0aff76a99804.
gcc/analyzer/ChangeLog:
PR analyzer/110387
* region.h (struct cast_region::key_t): Support "m_type" being
null by using "m_original_region" for empty/deleted slots.
On Thu, 2023-07-20 at 16:47 +0200, Martin Jambor wrote:
> Hi,
>
> This patch documents the analyzer parameters introduced in
> r14-2029-g0e466e978c7286 also in gcc/doc/invoke.texi.
>
> Committed as obvious after testing with make pdf and make info and
> eyeballing the result.
>
> Thanks,
Thanks
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-2658-gb86c0fe327a519.
gcc/analyzer/ChangeLog:
PR analyzer/110700
* region-model-manager.cc
(region_model_manager::get_or_create_int_cst): Assert that we have
an integral or pointer
On Tue, 2023-07-04 at 18:25 +0200, priour...@gmail.com wrote:
> From: benjamin priour
>
> Script contrib/check_GNU_style.sh complains about there being a space
> before a left square bracket ("operator new []").
> Though, it is actually within a literal string, and the space
> is required to co
Successfully regrtested on x86_64-pc-linux-gnu.
Verified fix on powerpc64le-unknown-linux-gnu (gcc112 in Compile Farm).
Pushed to trunk as r14-2223-gc3c0ba5436170e.
gcc/testsuite/ChangeLog:
PR jit/110466
* jit.dg/jit.exp (jit-check-debug-info): Gracefully handle too
early v
r13-4531-gd2e782cb99c311 added test coverage to libgccjit's vector
support, but used __vector, which doesn't work on Power. Additionally
the size param to gcc_jit_type_get_vector was wrong.
Fixed thusly.
Successfully regrtested on x86_64-pc-linux-gnu.
Verified fix on powerpc64le-unknown-linux-gn
On Thu, 2023-06-29 at 20:45 +0200, priour...@gmail.com wrote:
> From: benjamin priour
>
> See below formatting updates on my patch.
> In mail
> https://gcc.gnu.org/pipermail/gcc-patches/2023-June/623140.html,
> David Malcolm says regtesting failed for him.
>
> So I did i
On Thu, 2023-06-29 at 15:03 -0400, Marek Polacek wrote:
> Certain downstream compilers (for example, in Fedora) default to
> -freport-bug. The extra output breaks the following tests. We can
> use
> -fno-report-bug to fix that. Patch verified with:
>
> $ make check RUNTESTFLAGS='--target_board=
On Thu, 2023-06-22 at 21:55 +0200, priour...@gmail.com wrote:
> From: benjamin priour
>
> Resend with proper subject line ...
>
> Hi,
Hi Benjamin
>
> Below is the fix to regression bug
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110198
> Was bootstrapped and regtested successfully on x86_6
On Fri, 2023-06-23 at 16:35 +0100, Alex Coplan wrote:
> Thanks for the fix! I can confirm this fixes bootstrap on
> x86_64-apple-darwin for me.
Thanks Alex
Unfortunately the patch I posted broke the build of the plugin in
the testsuite, so I had to tweak things slightly.
Here's v2 of the patch,
> On Fri, 2023-06-23 at 12:08 -0400, Jason Merrill wrote:
> > On 6/22/23 11:50, Marek Polacek wrote:
> > > On Wed, Jun 21, 2023 at 04:44:00PM -0400, David Malcolm via Gcc-patches
> > > wrote:
> > > I'd like to ping this C++ FE patch for review:
> > &
On Fri, 2023-06-23 at 12:52 +0100, Alex Coplan wrote:
> Hi David,
>
> It looks like this patch breaks bootstrap on Darwin. I tried a
> bootstrap on
> x86_64-apple-darwin and got errors building selftest-run-tests.cc:
>
> In file included from
> /Users/alecop01/toolchain/src/gcc/gcc/selftest-run-t
I'd like to ping this C++ FE patch for review:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621779.html
Thanks
Dave
On Wed, 2023-06-14 at 20:28 -0400, David Malcolm wrote:
> PR c++/110164 notes that in cases where we have a forward decl
> of a std library type such as:
>
Does this testsuite patch look OK?
https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620275.html
Thanks
David
On Mon, 2023-06-12 at 19:11 -0400, David Malcolm wrote:
> Please can someone review this testsuite patch:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-May/62027
On Fri, 2022-08-05 at 12:04 -0400, Lewis Hyatt via Gcc-patches wrote:
>
> When libcpp reports diagnostics whose locus is a macro name (such as
> for
> -Wunused-macros), it uses the location in the cpp_macro object that
> was
> stored by _cpp_new_macro. This is currently set to pfile-
> >directive_
PR c/107583 notes that we weren't issuing a hint for
struct foo {
time_t mytime; /* missing include should trigger fixit */
};
in the C frontend.
The root cause is that one of the "unknown type name" diagnostics
was missing logic to emit hints, which this patch fixes.
Successfully boot
On Thu, 2023-06-15 at 01:43 +0100, Sam James wrote:
>
> Eric Gallager via Gcc-patches writes:
>
> > On Wed, Jun 14, 2023 at 8:29 PM David Malcolm via Gcc-patches
> > wrote:
> > >
> > > PR c++/110164 notes that in cases where we have a forward d
PR c++/110164 notes that in cases where we have a forward decl
of a std library type such as:
std::array x;
we omit this diagnostic:
error: aggregate ‘std::array x’ has incomplete type and cannot be
defined
This patch adds this hint to the diagnostic:
note: ‘std::array’ is defined in header ‘
Quoting "How a computer should talk to people" (as quoted
in "Concepts Error Messages for Humans"):
"Various negative tones or actions are unfriendly: being manipulative,
not giving a second chance, talking down, using fashionable slang,
blaming. We must not seem to blame the person. We should avo
Please can someone review this testsuite patch:
https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620275.html
Thanks
Dave
On Wed, 2023-05-31 at 14:06 -0400, David Malcolm wrote:
> I have followup patches that require checking for multiline patterns
> that have blank lines within them, s
PR analyzer/110112 notes that -fanalyzer is extremely slow on a source
file with large read-only static arrays, repeatedly building the
same compound_svalue representing the full initializer, and repeatedly
building svalues representing parts of the the full initialiazer.
This patch adds caches fo
On Fri, 2023-06-09 at 20:28 +0200, Tim Lange wrote:
> This patch adds the reproducers reported in PR 110014 as test cases.
> The
> false positives in those cases are already fixed with PR 109577.
>
> 2023-06-09 Tim Lange
>
> PR analyzer/110014
>
> gcc/testsuite/ChangeLog:
>
>
On Fri, 2023-06-09 at 20:28 +0200, Tim Lange wrote:
[...snip...]
Thanks for the patch.
> diff --git a/gcc/analyzer/constraint-manager.cc
> b/gcc/analyzer/constraint-manager.cc
> index 2c9c435527e..24cd8960098 100644
> --- a/gcc/analyzer/constraint-manager.cc
> +++ b/gcc/analyzer/constraint-man
On Wed, 2023-06-07 at 13:38 +0200, Benjamin Priour wrote:
> On Tue, Jun 6, 2023 at 8:37 PM David Malcolm
> wrote:
> >
> > On Tue, 2023-06-06 at 18:05 +0200, Benjamin Priour wrote:
>
> [...]
>
> > [Looks like you droppped the mailing list from the recipie
On Tue, 2023-06-06 at 13:48 +0200, priour...@gmail.com wrote:
> From: Benjamin Priour
Hi Benjamin, thanks for this patch.
Overall it look great.
You didn't say what testing you did on the patch. Typically when
preparing a patch for the mailing list we do a bootstrap build of gcc
with the patch
This patch implements many of the __atomic_* builtins from
sync-builtins.def as known_function subclasses within the analyzer.
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-1497-gef768035ae8090.
gcc/analyzer/ChangeLog:
PR analyzer/109015
* k
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r14-1496-gb8a916726e7f4b.
gcc/analyzer/ChangeLog:
* store.cc (store::eval_alias_1): Regions in different memory
spaces can't alias.
---
gcc/analyzer/store.cc | 12
1 file changed, 12 ins
?
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu, both with
gcc 4.8.5 and with gcc 10.3.1
Lightly tested with valgrind.
OK for trunk?
David Malcolm (3):
testsuite: move handle-multiline-outputs to before check for blank
lines
diagnostics: add support for "text ar
I have followup patches that require checking for multiline patterns
that have blank lines within them, so this moves the handling of
multiline patterns before the check for blank lines, allowing for such
multiline patterns.
Doing so uncovers some issues with existing multiline directives, which
t
Pushed to trunk as r14-1420-ge4c8f7024f02d8.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/malloc-sarif-1.c: Add missing verify-sarif-file
directive.
* gcc.dg/analyzer/sarif-pr107366.c: Likewise.
---
gcc/testsuite/gcc.dg/analyzer/malloc-sarif-1.c | 2 ++
gcc/testsuite/gcc.dg/
On Tue, 2023-05-23 at 09:34 +, Christophe Lyon wrote:
> The gcc.dg/analyzer/data-model-4.c and
> gcc.dg/analyzer/torture/conftest-1.c fail with recent glibc headers
> and succeed with older headers.
>
> The new error message is:
> warning: use of possibly-NULL 'f' where non-null expected [CWE-
the flags that
can lead to timevar_init being called.
* tree-diagnostic-client-data-hooks.cc: Include
"diagnostic-format-sarif.h" and "timevar.h".
(compiler_data_hooks::add_sarif_invocation_properties): New vfunc
implementation.
gcc/testsui
On Thu, 2023-03-30 at 10:05 +0200, Jakub Jelinek wrote:
> Hi!
>
> The gcc.dg/analyzer/pipe-glibc.c test FAILs when using recent glibc
> headers
> and succeeds with older headers.
> The important change is that
> https://sourceware.org/git/?p=glibc.git;a=commit;h=c1760eaf3b575ad174fd88b252fd16bd525
I've backported the following patches to the releases/gcc-12 branch
(shown in reverse chronological order):
r12-9367-g7903e0bca00384:
analyzer: fix ICE on certain longjmp calls [PR109094]
Cherrypicked from r13-6749-g430d7d88c1a123.
r12-9366-g833d822ff0e834:
analyzer: fix uninit false +ves
c-c++-common/Wxor-used-as-pow-pr107002-2.c: New test.
Signed-off-by: David Malcolm
---
gcc/c-family/c-common.h | 2 +-
gcc/c-family/c-warn.cc| 23 +++
gcc/c/c-typeck.cc | 2 +-
gcc/cp/parser.cc
* gcc.dg/plugin/diagnostic-test-paths-5.c: Likewise.
* lib/scansarif.exp (verify-sarif-file): New procedure.
* lib/verify-sarif-file.py: New support script.
libcpp/ChangeLog:
PR analyzer/109098
* charset.cc (cpp_valid_utf8_p): New function.
* in
rewrite in places.
(Other Debugging Techniques): Add notes on how to compare two
different exploded graphs.
Signed-off-by: David Malcolm
---
gcc/doc/analyzer.texi | 125 +++---
1 file changed, 116 insertions(+), 9 deletions(-)
diff --git a/gcc
On Fri, 2023-03-24 at 18:45 +0100, Alejandro Colomar wrote:
> Hi David,
>
> On 3/24/23 15:53, David Malcolm wrote:
> > On Fri, 2023-03-24 at 14:39 +0100, Alejandro Colomar via Gcc-
> > patches
> > wrote:
> > > Warn about the following
On Fri, 2023-03-24 at 14:39 +0100, Alejandro Colomar via Gcc-patches
wrote:
> Warn about the following:
>
> char s[3] = "foo";
>
> Initializing a char array with a string literal of the same length as
> the size of the array is usually a mistake. Rarely is the case where
> one wants to crea
I'd like to ping the following patch for review:
https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614165.html
Thanks
Dave
On Fri, 2023-03-17 at 16:53 -0400, David Malcolm wrote:
> PR other/109163 notes that when we write out JSON files, we traverse
> the keys within each
eref-before-check-pr109239-linux-bus.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/program-point.cc | 42 +
gcc/analyzer/program-point.h | 3 +
gcc/analyzer/sm-malloc.cc | 9 +-
.../deref-before-check-pr109239-linux-bus
Treat the file as UTF-8
encoded when reading it.
(scan-sarif-file-not): Likewise.
Signed-off-by: David Malcolm
---
gcc/testsuite/gcc.dg-selftests/dg-final.exp | 22 ++---
gcc/testsuite/lib/scanasm.exp | 22 +++--
gcc/testsuite/lib/scansa
svalue" param.
gcc/testsuite/ChangeLog:
PR analyzer/109094
* gcc.dg/analyzer/setjmp-pr109094.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/region-model.cc | 15 ++--
gcc/analyzer/region-model.h | 3 +-
.../gcc.dg/analyzer/setjmp-pr1
* c-c++-common/diagnostic-format-json-4.c: Likewise.
* c-c++-common/diagnostic-format-json-5.c: Rewrite regexps.
* c-c++-common/diagnostic-format-json-stderr-1.c: Update comment.
Signed-off-by: David Malcolm
---
gcc/json.cc | 40 ---
gcc
On Fri, 2023-03-17 at 17:10 +0100, Hans-Peter Nilsson wrote:
> > From: David Malcolm
> > Date: Thu, 16 Mar 2023 14:42:58 -0400
>
> > I think I prefer the top one-liner dg-skip-if approach you
> > mentioned in
> > your original email; it seems simplest.
>
On Thu, 2023-03-16 at 19:25 +0100, Hans-Peter Nilsson wrote:
> > From: David Malcolm
> > Date: Thu, 16 Mar 2023 13:55:48 -0400
>
> > On Thu, 2023-03-09 at 19:56 +0100, Hans-Peter Nilsson wrote:
> > > It's not obvious to me whether considered best to includ
On Thu, 2023-03-09 at 19:56 +0100, Hans-Peter Nilsson wrote:
> It's not obvious to me whether considered best to include or
> exclude these tests that depend on structure layout details.
> If excluding, the obvious alternative to this patch is then
> to add a top one-liner (to dg-skip-if the test f
On Tue, 2023-01-10 at 16:10 +0100, Martin Liška wrote:
> On 1/6/23 14:21, David Malcolm wrote:
> > On Fri, 2023-01-06 at 12:33 +0100, Martin Liška wrote:
> > > Patch can bootstrap on x86_64-linux-gnu and survives regression
> > > tests.
> >
> > Thanks for
est.
* gcc.dg/plugin/crash-test-ice-stderr.c: New test.
* gcc.dg/plugin/crash-test-write-though-null-sarif.c: New test.
* gcc.dg/plugin/crash-test-write-though-null-stderr.c: New test.
* gcc.dg/plugin/crash_test_plugin.c: New plugin.
* gcc.dg/plugin/plugin
: New test.
Signed-off-by: David Malcolm
---
gcc/testsuite/gcc.dg/analyzer/leak-pr105906.c | 32 +++
1 file changed, 32 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/analyzer/leak-pr105906.c
diff --git a/gcc/testsuite/gcc.dg/analyzer/leak-pr105906.c
b/gcc/testsuite/gcc.dg
Successfully regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-6639-gfa9d3aa67894c8.
gcc/testsuite/ChangeLog:
* gcc.dg/analyzer/exec-1.c: New test.
* gcc.dg/analyzer/snprintf-concat.c: New test.
* gcc.dg/analyzer/vsnprintf-1.c: New test.
Signed-off-by: David
test.
Signed-off-by: David Malcolm
---
.../leak-pr108045-with-call-summaries.c | 106 +
.../leak-pr108045-without-call-summaries.c| 107 ++
2 files changed, 213 insertions(+)
create mode 100644
gcc/testsuite/gcc.dg/analyzer/leak-pr108045-with-call-summar
aybe_live_values): New decl.
gcc/testsuite/ChangeLog:
PR analyzer/109059
* gcc.dg/analyzer/flex-with-call-summaries.c: Remove xfail.
* gcc.dg/analyzer/leak-pr109059-1.c: New test.
* gcc.dg/analyzer/leak-pr109059-2.c: New test.
Signed-off-by: David Malcolm
---
gcc/a
* gcc.dg/analyzer/deref-before-check-pr108475-1.c: New test.
* gcc.dg/analyzer/deref-before-check-pr108475-haproxy-tcpcheck.c:
New test.
* gcc.dg/analyzer/deref-before-check-pr109060-haproxy-cfgparse.c:
New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/sm-malloc
-deref-pr108251-smp_fetch_ssl_fc_has_early.c:
Likewise.
* gcc.dg/analyzer/null-deref-pr108400-SoftEtherVPN-WebUi.c: New
test, reduced from SoftEtherVPN's src/Cedar/WebUI.c.
Signed-off-by: David Malcolm
---
.../gcc.dg/analyzer/null-deref-pr102671-1.c | 167 +++
On Wed, 2023-03-08 at 05:58 +0100, Hans-Peter Nilsson wrote:
> Committed as obvious.
> -- >8 --
> The recently added tests missed checking for "fopenmp" (see
> other tests where "-fopenmp" is passed), which makes them
> fail on non-openmp systems.
Sorry about that; thanks for the fix.
Dave
Successfully tested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-6467-gdf0184906a7b86.
gcc/testsuite/ChangeLog:
PR analyzer/109016
* gcc.dg/analyzer/omp-parallel-for-1.c: New test.
* gcc.dg/analyzer/omp-parallel-for-get-min.c: New test.
Signed-off-by: David Malcolm
e/ChangeLog:
* gcc.dg/analyzer/doom-d_main-IdentifyVersion.c: New test.
* gcc.dg/analyzer/sprintf-1.c: New test.
* gcc.dg/analyzer/sprintf-concat.c: New test.
Signed-off-by: David Malcolm
---
gcc/analyzer/kf.cc| 29 ++
.../anal
6-1.c (test_2): Remove xfail.
Signed-off-by: David Malcolm
---
gcc/testsuite/gcc.dg/analyzer/pr99716-1.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/analyzer/pr99716-1.c
b/gcc/testsuite/gcc.dg/analyzer/pr99716-1.c
index 4fae368f321..2ccdcc73a5c 1
On Fri, 2023-03-03 at 10:35 +0100, Jakub Jelinek wrote:
> Hi!
>
> As mentioned in the PR, GCC's diagnostics self-tests fail if $COLUMNS
> < 42.
> Guarding each self-test with if (get_terminal_width () > 41) or
> similar
> would be a maintainance nightmare (PR has a patch to do so without
> reforma
501 - 600 of 1587 matches
Mail list logo