Age | Commit message (Collapse) | Author | Files | Lines |
|
The following testcase ICEs in cmp_csts_same_type because RAW_DATA_CST
isn't handled there. As TREE_TYPE (cst1) in that case is INTEGER_TYPE,
e.g. char/signed char/unsigned char, the type itself doesn't imply
the size, so the length is compared first, followed by comparing the
data.
While at it, I've noticed STRING_CST handling is wrong, because STRING_CST
can represent even string literals with embedded nul characters.
We shouldn't stop at those, hence memcmp.
While for STRING_CST TREE_TYPE should likely already imply the length
and so same type should imply same TREE_STRING_LENGTH, I've repeated
the comparisons in there just in case.
2025-03-14 Jakub Jelinek <jakub@redhat.com>
PR analyzer/119278
* svalue.cc (cmp_csts_same_type): For STRING_CST, compare
TREE_STRING_LENGTH first just in case and use memcmp rather
than strcmp. Handle RAW_DATA_CST.
* c-c++-common/analyzer/pr119278.c: New test.
|
|
gcc/analyzer/ChangeLog:
PR analyzer/117262
* region-model-manager.cc
(region_model_manager::get_or_create_constant_svalue): Use
NULL_TREE for the types of constant_svalue for RAW_DATA_CST.
(region_model_manager::maybe_fold_sub_svalue): Generalize
STRING_CST logic to also handle RAW_DATA_CST.
(region_model_manager::maybe_get_char_from_cst): New.
(region_model_manager::maybe_get_char_from_raw_data_cst): New.
* region-model-manager.h
(region_model_manager::maybe_get_char_from_cst): New decl.
(region_model_manager::maybe_get_char_from_raw_data_cst): New decl.
* region-model.cc (region_model::get_rvalue_1): Handle
RAW_DATA_CST.
* store.cc (get_subregion_within_ctor_for_ctor_pair): New.
(binding_map::apply_ctor_pair_to_child_region): Call
get_subregion_within_ctor_for_ctor_pair so that we handle
RAW_DATA_CST.
gcc/testsuite/ChangeLog:
PR analyzer/117262
* c-c++-common/analyzer/raw-data-cst-pr117262-1.c: New test.
* c-c++-common/analyzer/raw-data-cst-pr117262-2.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
On top of the
https://gcc.gnu.org/pipermail/gcc-patches/2024-November/668554.html
patch which introduces the nonnull_if_nonzero attribute (because
C2Y is allowing NULL arguments on various calls like memcpy, memset,
strncpy etc. as long as the count is 0) the following patch adds just
limited handling of the attribute in the analyzer.
For nonnull attribute(s) we have the get_nonnull_args helper which
returns a bitmap, for nonnull_if_nonzero a function would need to
return a hash_map or something similar, I think it is better to
handle the attributes one by one. This patch just handles the
non-zero INTEGER_CST (integer_nonzerop) count arguments, in other places
the above patch uses ranger to some extent, but I'm not familiar enough
with the analyzer to know if one can use the ranger, or should somehow
explain in data structures the conditional nature of the nonnull property,
the argument is nonnull only if some other argument is nonzero.
Also, analyzer uses get_nonnull_args in another spot when entering a frame,
not sure if anything can be done there (note the conditional nonnull
somehow, pass from callers if the argument is nonzero, ...).
Note, the testsuite changes aren't strictly necessary with just
the above and this patch, but will be with a patch I'm going to post
soon.
2025-02-24 Jakub Jelinek <jakub@redhat.com>
PR c/117023
gcc/analyzer/
* sm-malloc.cc (malloc_state_machine::handle_nonnull): New private
method.
(malloc_state_machine::on_stmt): Use it for nonnull attribute arguments.
Handle also nonnull_if_nonzero attributes.
gcc/testsuite/
* c-c++-common/analyzer/call-summaries-malloc.c
(test_use_without_check): Pass 4 rather than sz to memset.
* c-c++-common/analyzer/strncpy-1.c (test_null_dst,
test_null_src): Pass 42 rather than count to strncpy.
|
|
dynamic stack allocation not supported'
In Subversion r217296 (Git commit e2acc079ff125a869159be45371dc0a29b230e92)
"Testsuite alloca fixes for ptx", effective-target 'alloca' was added to mark
up test cases that run into the nvptx back end's non-support of dynamic stack
allocation. (Later, nvptx gained conditional support for that in
commit 3861d362ec7e3c50742fc43833fe9d8674f4070e
"nvptx: PTX 'alloca' for '-mptx=7.3'+, '-march=sm_52'+ [PR65181]", but on the
other hand, in commit f93a612fc4567652b75ffc916d31a446378e6613
"bpf: liberate R9 for general register allocation", the BPF back end joined
"the list of targets that do not support alloca in target-support.exp".
Manually maintaining the list of test cases requiring effective-target 'alloca'
is notoriously hard, gets out of date quickly: new test cases added to the test
suite may need to be analyzed and annotated, and over time annotations also may
need to be removed, in cases where the compiler learns to optimize out
'alloca'/VLA usage, for example. This commit replaces (99 % of) the manual
annotations with an automatic scheme: turn test cases into UNSUPPORTED if
running into 'sorry, unimplemented: dynamic stack allocation not supported'.
gcc/testsuite/
* lib/target-supports.exp (check_effective_target_alloca):
Gracefully handle the case that we've not be called (indirectly)
from 'dg-test'.
* lib/gcc-dg.exp (proc gcc-dg-prune): Turn
'sorry, unimplemented: dynamic stack allocation not supported' into
UNSUPPORTED.
* c-c++-common/Walloca-larger-than.c: Don't
'dg-require-effective-target alloca'.
* c-c++-common/Warray-bounds-9.c: Likewise.
* c-c++-common/Warray-bounds.c: Likewise.
* c-c++-common/Wdangling-pointer-2.c: Likewise.
* c-c++-common/Wdangling-pointer-4.c: Likewise.
* c-c++-common/Wdangling-pointer-5.c: Likewise.
* c-c++-common/Wdangling-pointer.c: Likewise.
* c-c++-common/Wimplicit-fallthrough-7.c: Likewise.
* c-c++-common/Wsizeof-pointer-memaccess1.c: Likewise.
* c-c++-common/Wsizeof-pointer-memaccess2.c: Likewise.
* c-c++-common/Wstringop-truncation.c: Likewise.
* c-c++-common/Wunused-var-6.c: Likewise.
* c-c++-common/Wunused-var-8.c: Likewise.
* c-c++-common/analyzer/alloca-leak.c: Likewise.
* c-c++-common/analyzer/allocation-size-multiline-2.c: Likewise.
* c-c++-common/analyzer/allocation-size-multiline-3.c: Likewise.
* c-c++-common/analyzer/capacity-1.c: Likewise.
* c-c++-common/analyzer/capacity-3.c: Likewise.
* c-c++-common/analyzer/imprecise-floating-point-1.c: Likewise.
* c-c++-common/analyzer/infinite-recursion-alloca.c: Likewise.
* c-c++-common/analyzer/malloc-callbacks.c: Likewise.
* c-c++-common/analyzer/malloc-paths-8.c: Likewise.
* c-c++-common/analyzer/out-of-bounds-5.c: Likewise.
* c-c++-common/analyzer/out-of-bounds-diagram-11.c: Likewise.
* c-c++-common/analyzer/uninit-alloca.c: Likewise.
* c-c++-common/analyzer/write-to-string-literal-5.c: Likewise.
* c-c++-common/asan/alloca_loop_unpoisoning.c: Likewise.
* c-c++-common/auto-init-11.c: Likewise.
* c-c++-common/auto-init-12.c: Likewise.
* c-c++-common/auto-init-15.c: Likewise.
* c-c++-common/auto-init-16.c: Likewise.
* c-c++-common/builtins.c: Likewise.
* c-c++-common/dwarf2/vla1.c: Likewise.
* c-c++-common/gomp/pr61486-2.c: Likewise.
* c-c++-common/torture/builtin-clear-padding-4.c: Likewise.
* c-c++-common/torture/strub-run3.c: Likewise.
* c-c++-common/torture/strub-run4.c: Likewise.
* c-c++-common/torture/strub-run4c.c: Likewise.
* c-c++-common/torture/strub-run4d.c: Likewise.
* c-c++-common/torture/strub-run4i.c: Likewise.
* g++.dg/Walloca1.C: Likewise.
* g++.dg/Walloca2.C: Likewise.
* g++.dg/cpp0x/pr70338.C: Likewise.
* g++.dg/cpp1y/lambda-generic-vla1.C: Likewise.
* g++.dg/cpp1y/vla10.C: Likewise.
* g++.dg/cpp1y/vla2.C: Likewise.
* g++.dg/cpp1y/vla6.C: Likewise.
* g++.dg/cpp1y/vla8.C: Likewise.
* g++.dg/debug/debug5.C: Likewise.
* g++.dg/debug/debug6.C: Likewise.
* g++.dg/debug/pr54828.C: Likewise.
* g++.dg/diagnostic/pr70105.C: Likewise.
* g++.dg/eh/cleanup5.C: Likewise.
* g++.dg/eh/spbp.C: Likewise.
* g++.dg/ext/builtin_alloca.C: Likewise.
* g++.dg/ext/tmplattr9.C: Likewise.
* g++.dg/ext/vla10.C: Likewise.
* g++.dg/ext/vla11.C: Likewise.
* g++.dg/ext/vla12.C: Likewise.
* g++.dg/ext/vla15.C: Likewise.
* g++.dg/ext/vla16.C: Likewise.
* g++.dg/ext/vla17.C: Likewise.
* g++.dg/ext/vla23.C: Likewise.
* g++.dg/ext/vla3.C: Likewise.
* g++.dg/ext/vla6.C: Likewise.
* g++.dg/ext/vla7.C: Likewise.
* g++.dg/init/array24.C: Likewise.
* g++.dg/init/new47.C: Likewise.
* g++.dg/init/pr55497.C: Likewise.
* g++.dg/opt/pr78201.C: Likewise.
* g++.dg/template/vla2.C: Likewise.
* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Likewise.
* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Likewise.
* g++.dg/torture/pr62127.C: Likewise.
* g++.dg/torture/pr67055.C: Likewise.
* g++.dg/torture/stackalign/eh-alloca-1.C: Likewise.
* g++.dg/torture/stackalign/eh-inline-2.C: Likewise.
* g++.dg/torture/stackalign/eh-vararg-1.C: Likewise.
* g++.dg/torture/stackalign/eh-vararg-2.C: Likewise.
* g++.dg/warn/Wplacement-new-size-5.C: Likewise.
* g++.dg/warn/Wsizeof-pointer-memaccess-1.C: Likewise.
* g++.dg/warn/Wvla-1.C: Likewise.
* g++.dg/warn/Wvla-3.C: Likewise.
* g++.old-deja/g++.ext/array2.C: Likewise.
* g++.old-deja/g++.ext/constructor.C: Likewise.
* g++.old-deja/g++.law/builtin1.C: Likewise.
* g++.old-deja/g++.other/crash12.C: Likewise.
* g++.old-deja/g++.other/eh3.C: Likewise.
* g++.old-deja/g++.pt/array6.C: Likewise.
* g++.old-deja/g++.pt/dynarray.C: Likewise.
* gcc.c-torture/compile/20000923-1.c: Likewise.
* gcc.c-torture/compile/20030224-1.c: Likewise.
* gcc.c-torture/compile/20071108-1.c: Likewise.
* gcc.c-torture/compile/20071117-1.c: Likewise.
* gcc.c-torture/compile/900313-1.c: Likewise.
* gcc.c-torture/compile/parms.c: Likewise.
* gcc.c-torture/compile/pr17397.c: Likewise.
* gcc.c-torture/compile/pr35006.c: Likewise.
* gcc.c-torture/compile/pr42956.c: Likewise.
* gcc.c-torture/compile/pr51354.c: Likewise.
* gcc.c-torture/compile/pr52714.c: Likewise.
* gcc.c-torture/compile/pr55851.c: Likewise.
* gcc.c-torture/compile/pr77754-1.c: Likewise.
* gcc.c-torture/compile/pr77754-2.c: Likewise.
* gcc.c-torture/compile/pr77754-3.c: Likewise.
* gcc.c-torture/compile/pr77754-4.c: Likewise.
* gcc.c-torture/compile/pr77754-5.c: Likewise.
* gcc.c-torture/compile/pr77754-6.c: Likewise.
* gcc.c-torture/compile/pr78439.c: Likewise.
* gcc.c-torture/compile/pr79413.c: Likewise.
* gcc.c-torture/compile/pr82564.c: Likewise.
* gcc.c-torture/compile/pr87110.c: Likewise.
* gcc.c-torture/compile/pr99787-1.c: Likewise.
* gcc.c-torture/compile/vla-const-1.c: Likewise.
* gcc.c-torture/compile/vla-const-2.c: Likewise.
* gcc.c-torture/execute/20010209-1.c: Likewise.
* gcc.c-torture/execute/20020314-1.c: Likewise.
* gcc.c-torture/execute/20020412-1.c: Likewise.
* gcc.c-torture/execute/20021113-1.c: Likewise.
* gcc.c-torture/execute/20040223-1.c: Likewise.
* gcc.c-torture/execute/20040308-1.c: Likewise.
* gcc.c-torture/execute/20040811-1.c: Likewise.
* gcc.c-torture/execute/20070824-1.c: Likewise.
* gcc.c-torture/execute/20070919-1.c: Likewise.
* gcc.c-torture/execute/built-in-setjmp.c: Likewise.
* gcc.c-torture/execute/pr22061-1.c: Likewise.
* gcc.c-torture/execute/pr43220.c: Likewise.
* gcc.c-torture/execute/pr82210.c: Likewise.
* gcc.c-torture/execute/pr86528.c: Likewise.
* gcc.c-torture/execute/vla-dealloc-1.c: Likewise.
* gcc.dg/20001012-2.c: Likewise.
* gcc.dg/20020415-1.c: Likewise.
* gcc.dg/20030331-2.c: Likewise.
* gcc.dg/20101010-1.c: Likewise.
* gcc.dg/Walloca-1.c: Likewise.
* gcc.dg/Walloca-10.c: Likewise.
* gcc.dg/Walloca-11.c: Likewise.
* gcc.dg/Walloca-12.c: Likewise.
* gcc.dg/Walloca-13.c: Likewise.
* gcc.dg/Walloca-14.c: Likewise.
* gcc.dg/Walloca-15.c: Likewise.
* gcc.dg/Walloca-2.c: Likewise.
* gcc.dg/Walloca-3.c: Likewise.
* gcc.dg/Walloca-4.c: Likewise.
* gcc.dg/Walloca-5.c: Likewise.
* gcc.dg/Walloca-6.c: Likewise.
* gcc.dg/Walloca-7.c: Likewise.
* gcc.dg/Walloca-8.c: Likewise.
* gcc.dg/Walloca-9.c: Likewise.
* gcc.dg/Walloca-larger-than-2.c: Likewise.
* gcc.dg/Walloca-larger-than-3.c: Likewise.
* gcc.dg/Walloca-larger-than-4.c: Likewise.
* gcc.dg/Walloca-larger-than.c: Likewise.
* gcc.dg/Warray-bounds-22.c: Likewise.
* gcc.dg/Warray-bounds-41.c: Likewise.
* gcc.dg/Warray-bounds-46.c: Likewise.
* gcc.dg/Warray-bounds-48-novec.c: Likewise.
* gcc.dg/Warray-bounds-48.c: Likewise.
* gcc.dg/Warray-bounds-50.c: Likewise.
* gcc.dg/Warray-bounds-63.c: Likewise.
* gcc.dg/Warray-bounds-66.c: Likewise.
* gcc.dg/Wdangling-pointer.c: Likewise.
* gcc.dg/Wfree-nonheap-object-2.c: Likewise.
* gcc.dg/Wfree-nonheap-object.c: Likewise.
* gcc.dg/Wrestrict-17.c: Likewise.
* gcc.dg/Wrestrict.c: Likewise.
* gcc.dg/Wreturn-local-addr-2.c: Likewise.
* gcc.dg/Wreturn-local-addr-3.c: Likewise.
* gcc.dg/Wreturn-local-addr-4.c: Likewise.
* gcc.dg/Wreturn-local-addr-6.c: Likewise.
* gcc.dg/Wsizeof-pointer-memaccess1.c: Likewise.
* gcc.dg/Wstack-usage.c: Likewise.
* gcc.dg/Wstrict-aliasing-bogus-vla-1.c: Likewise.
* gcc.dg/Wstrict-overflow-27.c: Likewise.
* gcc.dg/Wstringop-overflow-15.c: Likewise.
* gcc.dg/Wstringop-overflow-23.c: Likewise.
* gcc.dg/Wstringop-overflow-25.c: Likewise.
* gcc.dg/Wstringop-overflow-27.c: Likewise.
* gcc.dg/Wstringop-overflow-3.c: Likewise.
* gcc.dg/Wstringop-overflow-39.c: Likewise.
* gcc.dg/Wstringop-overflow-56.c: Likewise.
* gcc.dg/Wstringop-overflow-57.c: Likewise.
* gcc.dg/Wstringop-overflow-67.c: Likewise.
* gcc.dg/Wstringop-overflow-71.c: Likewise.
* gcc.dg/Wstringop-truncation-3.c: Likewise.
* gcc.dg/Wvla-larger-than-1.c: Likewise.
* gcc.dg/Wvla-larger-than-2.c: Likewise.
* gcc.dg/Wvla-larger-than-3.c: Likewise.
* gcc.dg/Wvla-larger-than-4.c: Likewise.
* gcc.dg/Wvla-larger-than-5.c: Likewise.
* gcc.dg/analyzer/boxed-malloc-1.c: Likewise.
* gcc.dg/analyzer/call-summaries-2.c: Likewise.
* gcc.dg/analyzer/malloc-1.c: Likewise.
* gcc.dg/analyzer/malloc-reuse.c: Likewise.
* gcc.dg/analyzer/out-of-bounds-diagram-12.c: Likewise.
* gcc.dg/analyzer/pr93355-localealias.c: Likewise.
* gcc.dg/analyzer/putenv-1.c: Likewise.
* gcc.dg/analyzer/taint-alloc-1.c: Likewise.
* gcc.dg/analyzer/torture/pr93373.c: Likewise.
* gcc.dg/analyzer/torture/ubsan-1.c: Likewise.
* gcc.dg/analyzer/vla-1.c: Likewise.
* gcc.dg/atomic/stdatomic-vm.c: Likewise.
* gcc.dg/attr-alloc_size-6.c: Likewise.
* gcc.dg/attr-alloc_size-7.c: Likewise.
* gcc.dg/attr-alloc_size-8.c: Likewise.
* gcc.dg/attr-alloc_size-9.c: Likewise.
* gcc.dg/attr-noipa.c: Likewise.
* gcc.dg/auto-init-uninit-36.c: Likewise.
* gcc.dg/auto-init-uninit-9.c: Likewise.
* gcc.dg/auto-type-1.c: Likewise.
* gcc.dg/builtin-alloc-size.c: Likewise.
* gcc.dg/builtin-dynamic-alloc-size.c: Likewise.
* gcc.dg/builtin-dynamic-object-size-1.c: Likewise.
* gcc.dg/builtin-dynamic-object-size-2.c: Likewise.
* gcc.dg/builtin-dynamic-object-size-3.c: Likewise.
* gcc.dg/builtin-dynamic-object-size-4.c: Likewise.
* gcc.dg/builtin-object-size-1.c: Likewise.
* gcc.dg/builtin-object-size-2.c: Likewise.
* gcc.dg/builtin-object-size-3.c: Likewise.
* gcc.dg/builtin-object-size-4.c: Likewise.
* gcc.dg/builtins-64.c: Likewise.
* gcc.dg/builtins-68.c: Likewise.
* gcc.dg/c23-auto-2.c: Likewise.
* gcc.dg/c99-const-expr-13.c: Likewise.
* gcc.dg/c99-vla-1.c: Likewise.
* gcc.dg/fold-alloca-1.c: Likewise.
* gcc.dg/gomp/pr30494.c: Likewise.
* gcc.dg/gomp/vla-2.c: Likewise.
* gcc.dg/gomp/vla-3.c: Likewise.
* gcc.dg/gomp/vla-4.c: Likewise.
* gcc.dg/gomp/vla-5.c: Likewise.
* gcc.dg/graphite/pr99085.c: Likewise.
* gcc.dg/guality/guality.c: Likewise.
* gcc.dg/lto/pr80778_0.c: Likewise.
* gcc.dg/nested-func-10.c: Likewise.
* gcc.dg/nested-func-12.c: Likewise.
* gcc.dg/nested-func-13.c: Likewise.
* gcc.dg/nested-func-14.c: Likewise.
* gcc.dg/nested-func-15.c: Likewise.
* gcc.dg/nested-func-16.c: Likewise.
* gcc.dg/nested-func-17.c: Likewise.
* gcc.dg/nested-func-9.c: Likewise.
* gcc.dg/packed-vla.c: Likewise.
* gcc.dg/pr100225.c: Likewise.
* gcc.dg/pr25682.c: Likewise.
* gcc.dg/pr27301.c: Likewise.
* gcc.dg/pr31507-1.c: Likewise.
* gcc.dg/pr33238.c: Likewise.
* gcc.dg/pr41470.c: Likewise.
* gcc.dg/pr49120.c: Likewise.
* gcc.dg/pr50764.c: Likewise.
* gcc.dg/pr51491-2.c: Likewise.
* gcc.dg/pr51990-2.c: Likewise.
* gcc.dg/pr51990.c: Likewise.
* gcc.dg/pr59011.c: Likewise.
* gcc.dg/pr59523.c: Likewise.
* gcc.dg/pr61561.c: Likewise.
* gcc.dg/pr78468.c: Likewise.
* gcc.dg/pr78902.c: Likewise.
* gcc.dg/pr79972.c: Likewise.
* gcc.dg/pr82875.c: Likewise.
* gcc.dg/pr83844.c: Likewise.
* gcc.dg/pr84131.c: Likewise.
* gcc.dg/pr87099.c: Likewise.
* gcc.dg/pr87320.c: Likewise.
* gcc.dg/pr89045.c: Likewise.
* gcc.dg/pr91014.c: Likewise.
* gcc.dg/pr93986.c: Likewise.
* gcc.dg/pr98721-1.c: Likewise.
* gcc.dg/pr99122-2.c: Likewise.
* gcc.dg/shrink-wrap-alloca.c: Likewise.
* gcc.dg/sso-14.c: Likewise.
* gcc.dg/strlenopt-62.c: Likewise.
* gcc.dg/strlenopt-83.c: Likewise.
* gcc.dg/strlenopt-84.c: Likewise.
* gcc.dg/strlenopt-91.c: Likewise.
* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Likewise.
* gcc.dg/torture/calleesave-sse.c: Likewise.
* gcc.dg/torture/pr48953.c: Likewise.
* gcc.dg/torture/pr71881.c: Likewise.
* gcc.dg/torture/pr71901.c: Likewise.
* gcc.dg/torture/pr78742.c: Likewise.
* gcc.dg/torture/pr92088-1.c: Likewise.
* gcc.dg/torture/pr92088-2.c: Likewise.
* gcc.dg/torture/pr93124.c: Likewise.
* gcc.dg/torture/pr94479.c: Likewise.
* gcc.dg/torture/stackalign/alloca-1.c: Likewise.
* gcc.dg/torture/stackalign/inline-2.c: Likewise.
* gcc.dg/torture/stackalign/nested-3.c: Likewise.
* gcc.dg/torture/stackalign/vararg-1.c: Likewise.
* gcc.dg/torture/stackalign/vararg-2.c: Likewise.
* gcc.dg/tree-ssa/20030807-2.c: Likewise.
* gcc.dg/tree-ssa/20080530.c: Likewise.
* gcc.dg/tree-ssa/alias-37.c: Likewise.
* gcc.dg/tree-ssa/builtin-sprintf-warn-22.c: Likewise.
* gcc.dg/tree-ssa/builtin-sprintf-warn-25.c: Likewise.
* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Likewise.
* gcc.dg/tree-ssa/loop-interchange-15.c: Likewise.
* gcc.dg/tree-ssa/pr23848-1.c: Likewise.
* gcc.dg/tree-ssa/pr23848-2.c: Likewise.
* gcc.dg/tree-ssa/pr23848-3.c: Likewise.
* gcc.dg/tree-ssa/pr23848-4.c: Likewise.
* gcc.dg/uninit-32.c: Likewise.
* gcc.dg/uninit-36.c: Likewise.
* gcc.dg/uninit-39.c: Likewise.
* gcc.dg/uninit-41.c: Likewise.
* gcc.dg/uninit-9-O0.c: Likewise.
* gcc.dg/uninit-9.c: Likewise.
* gcc.dg/uninit-pr100250.c: Likewise.
* gcc.dg/uninit-pr101300.c: Likewise.
* gcc.dg/uninit-pr101494.c: Likewise.
* gcc.dg/uninit-pr98583.c: Likewise.
* gcc.dg/vla-2.c: Likewise.
* gcc.dg/vla-22.c: Likewise.
* gcc.dg/vla-24.c: Likewise.
* gcc.dg/vla-3.c: Likewise.
* gcc.dg/vla-4.c: Likewise.
* gcc.dg/vla-stexp-1.c: Likewise.
* gcc.dg/vla-stexp-2.c: Likewise.
* gcc.dg/vla-stexp-4.c: Likewise.
* gcc.dg/vla-stexp-5.c: Likewise.
* gcc.dg/winline-7.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-1.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-10.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-2.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-3.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-4.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-5.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-6.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-7.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-8.c: Likewise.
* gcc.target/aarch64/stack-check-alloca-9.c: Likewise.
* gcc.target/arc/interrupt-6.c: Likewise.
* gcc.target/i386/pr80969-3.c: Likewise.
* gcc.target/loongarch/stack-check-alloca-1.c: Likewise.
* gcc.target/loongarch/stack-check-alloca-2.c: Likewise.
* gcc.target/loongarch/stack-check-alloca-3.c: Likewise.
* gcc.target/loongarch/stack-check-alloca-4.c: Likewise.
* gcc.target/loongarch/stack-check-alloca-5.c: Likewise.
* gcc.target/loongarch/stack-check-alloca-6.c: Likewise.
* gcc.target/riscv/stack-check-alloca-1.c: Likewise.
* gcc.target/riscv/stack-check-alloca-10.c: Likewise.
* gcc.target/riscv/stack-check-alloca-2.c: Likewise.
* gcc.target/riscv/stack-check-alloca-3.c: Likewise.
* gcc.target/riscv/stack-check-alloca-4.c: Likewise.
* gcc.target/riscv/stack-check-alloca-5.c: Likewise.
* gcc.target/riscv/stack-check-alloca-6.c: Likewise.
* gcc.target/riscv/stack-check-alloca-7.c: Likewise.
* gcc.target/riscv/stack-check-alloca-8.c: Likewise.
* gcc.target/riscv/stack-check-alloca-9.c: Likewise.
* gcc.target/sparc/setjmp-1.c: Likewise.
* gcc.target/x86_64/abi/ms-sysv/ms-sysv.c: Likewise.
* gcc.c-torture/compile/20001221-1.c: Don't 'dg-skip-if'
for '! alloca'.
* gcc.c-torture/compile/20020807-1.c: Likewise.
* gcc.c-torture/compile/20050801-2.c: Likewise.
* gcc.c-torture/compile/920428-4.c: Likewise.
* gcc.c-torture/compile/debugvlafunction-1.c: Likewise.
* gcc.c-torture/compile/pr41469.c: Likewise.
* gcc.c-torture/execute/920721-2.c: Likewise.
* gcc.c-torture/execute/920929-1.c: Likewise.
* gcc.c-torture/execute/921017-1.c: Likewise.
* gcc.c-torture/execute/941202-1.c: Likewise.
* gcc.c-torture/execute/align-nest.c: Likewise.
* gcc.c-torture/execute/alloca-1.c: Likewise.
* gcc.c-torture/execute/pr22061-4.c: Likewise.
* gcc.c-torture/execute/pr36321.c: Likewise.
* gcc.dg/torture/pr8081.c: Likewise.
* gcc.dg/analyzer/data-model-1.c: Don't
'dg-require-effective-target alloca'. XFAIL relevant
'dg-warning's for '! alloca'.
* gcc.dg/uninit-38.c: Likewise.
* gcc.dg/uninit-pr98578.c: Likewise.
* gcc.dg/compat/struct-by-value-22_main.c: Comment on
'dg-require-effective-target alloca'.
libstdc++-v3/
* testsuite/lib/prune.exp (proc libstdc++-dg-prune): Turn
'sorry, unimplemented: dynamic stack allocation not supported' into
UNSUPPORTED.
|
|
When the program requests a conversion to a typedef, let's try harder to
remember the new name.
Torbjörn's original patch changed the type of the original expression, but
that seems not generally desirable; we might want either or both of the
original type and the converted-to type to be represented. So this
expresses the name change as a NOP_EXPR.
Compiling stdc++.h, this adds 519 allocations out of 1870k, or 0.28%.
The -Wsuggest-attribute=format change was necessary to do the check before
converting to the target type, which seems like an improvement.
PR c/116060
gcc/c/ChangeLog:
* c-typeck.cc (convert_for_assignment): Make sure left hand side and
right hand side has identical named types to aid diagnostic output.
gcc/cp/ChangeLog:
* call.cc (standard_conversion): Preserve type name in ck_identity.
(maybe_adjust_type_name): New.
(convert_like_internal): Use it.
Handle -Wsuggest-attribute=format here.
(convert_for_arg_passing): Not here.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/out-of-bounds-diagram-8.c: Update to
correct type.
* c-c++-common/analyzer/out-of-bounds-diagram-11.c: Likewise.
* gcc.dg/analyzer/out-of-bounds-diagram-10.c: Likewise.
Co-authored-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
|
|
Change the default language version for C compilation from -std=gnu17
to -std=gnu23. A few tests are updated to remove local definitions of
bool, true and false (where making such an unconditional test change
seemed to make more sense than changing the test conditionally earlier
or building it with -std=gnu17); most test issues were already
addressed in previous patches. In the case of
ctf-function-pointers-2.c, it was agreed in bug 117289 that it would
be OK to put -std=gnu17 in the test and leave more optimal BTF / CTF
output for this test as a potential future improvement.
Since the original test fixes, more such fixes have become necessary
and so are included in this patch. More noinline attributes are added
to simulate-thread tests where () meaning a prototype affected test
results, while gcc.dg/torture/pr117496-1.c (a test declaring a
function with () then calling it with arguments) gets -std=gnu17
added.
Bootstrapped with no regressions for x86_64-pc-linux-gnu.
NOTE: it's likely there are target-specific tests for non-x86 targets
that need updating as a result of this change. See commit
9fb5348e3021021e82d75e4ca4e6f8d51a34c24f ("testsuite: Prepare for
-std=gnu23 default") for examples of changes to prepare the testsuite
to work with a -std=gnu23 default. In most cases, adding
-Wno-old-style-definition (for warnings for old-style function
definitions) or -std=gnu17 (for other issues such as unprototyped
function declarations with ()) is appropriate, but watch out for cases
that indicate bugs with -std=gnu23 (in particular, any ICEs - there
was only the one nested function test where I had to fix an ICE on
x86_64).
gcc/
* doc/invoke.texi (-std=gnu17, -std=gnu23): Document -std=gnu23 as
default for C code.
gcc/c-family/
* c-opts.cc (c_common_init_options): Default to C23.
gcc/testsuite/
* c-c++-common/analyzer/asm-x86-dyndbg-2.c,
c-c++-common/analyzer/asm-x86-lp64-2.c,
c-c++-common/analyzer/attr-malloc-CVE-2019-19078-usb-leak.c,
c-c++-common/analyzer/coreutils-cksum-pr108664.c,
c-c++-common/analyzer/feasibility-3.c,
c-c++-common/analyzer/pr105783.c, c-c++-common/analyzer/sock-1.c,
c-c++-common/attributes-4.c, gcc.dg/Warray-bounds-78.c,
gcc.dg/analyzer/asm-x86-dyndbg-1.c: Do not define bool, true or
false.
* gcc.dg/debug/ctf/ctf-function-pointers-2.c: Use -std-gnu17.
* gcc.dg/gnu23-version-2.c: New test.
* gcc.dg/simulate-thread/atomic-load-int.c,
gcc.dg/simulate-thread/atomic-load-longlong.c,
gcc.dg/simulate-thread/atomic-load-short.c: Add more noinline
attributes.
* gcc.dg/torture/pr117496-1.c: Use -std=gnu17.
|
|
Now that C23 support is essentially feature-complete, I'd like to
switch the default language version for C compilation to -std=gnu23.
This requires updating a large number of testcases that fail with the
new language version if left unchanged. In this patch, update most of
the tests for which there is a safe change that works both before and
after the update to default language version - typically adding the
option -std=gnu17 or -Wno-old-style-definition to the tests. (There
are also a few tests where I'd like to investigate further why they
fail with -std=gnu23, or where I think such failures show an actual
bug to fix before changing the default language version, or where it
seems more appropriate to make a testcase change that would result in
failures in the absence of the language version change rather than
just adding an option that does nothing with the gnu17 default.)
The libffi test fixes have also been submitted upstream:
<https://github.com/libffi/libffi/pull/861>.
Most of the failures requiring such changes are for one of two
reasons:
* Unprototyped function declarations with () (meaning the same as
(void) in C23 mode) for a function then called with arguments.
* Old-style function definitions, which warn by default in C23 mode,
so resulting in test failures for the unexpected warnings.
Other reasons for failures include:
* Tests with their own definitions of bool, true and false.
* Tests of diagnostics (often with -pedantic) in cases where C23 has
changed semantics, such as:
- tag compatibility for structs;
- enum values out of range of int;
- handing of qualified array types;
- decimal floating types formerly needing -pedantic diagnostics, but
being standard in C23.
Bootstrapped with no regressions for x86_64-pc-linux-gnu.
gcc/testsuite/
* c-c++-common/Wcast-function-type.c: Add -std=gnu17 for C.
* c-c++-common/Wformat-pr84258.c: Add -std=gnu17 for C.
* c-c++-common/Wvarargs.c: Add -std=gnu17 for C.
* c-c++-common/analyzer/data-model-12.c: Add -std=gnu17 for C.
* c-c++-common/builtins.c: Add -std=gnu17 for C.
* c-c++-common/pointer-to-fn1.c: Add -std=gnu17 for C.
* c-c++-common/pragma-diag-17.c: Add -std=gnu17 for C.
* c-c++-common/sizeof-array-argument.c: Add
-Wno-old-style-definition for C.
* g++.dg/lto/pr54625-1_0.c: Add -std=gnu17.
* g++.dg/lto/pr54625-2_0.c: Add -std=gnu17.
* gcc.c-torture/compile/20040214-2.c: Add -std=gnu17.
* gcc.c-torture/compile/921011-2.c: Add -std=gnu17.
* gcc.c-torture/compile/931102-1.c: Add -std=gnu17.
* gcc.c-torture/compile/990801-1.c: Add -std=gnu17.
* gcc.c-torture/compile/nested-1.c: Add -std=gnu17.
* gcc.c-torture/compile/pr100241-1.c: Add -std=gnu17.
* gcc.c-torture/compile/pr106101.c: Add -std=gnu17.
* gcc.c-torture/compile/pr113616.c: Add -std=gnu17.
* gcc.c-torture/compile/pr47967.c: Add -std=gnu17.
* gcc.c-torture/compile/pr51694.c: Add -std=gnu17.
* gcc.c-torture/compile/pr71109.c: Add -std=gnu17.
* gcc.c-torture/compile/pr83051-2.c: Add -std=gnu17.
* gcc.c-torture/compile/pr89663-1.c: Add -std=gnu17.
* gcc.c-torture/compile/pr94238.c: Add -std=gnu17.
* gcc.c-torture/compile/pr96796.c: Add -std=gnu17.
* gcc.c-torture/compile/pr97576.c: Add -std=gnu17.
* gcc.c-torture/compile/udivmod4.c: Add -std=gnu17.
* gcc.c-torture/execute/20010605-2.c: Add -std=gnu17.
* gcc.c-torture/execute/20020404-1.c: Add -std=gnu17.
* gcc.c-torture/execute/20030714-1.c: Add -std=gnu17.
* gcc.c-torture/execute/20051012-1.c: Add -std=gnu17.
* gcc.c-torture/execute/20190820-1.c: Add -std=gnu17.
* gcc.c-torture/execute/920612-1.c: Add -Wno-old-style-definition.
* gcc.c-torture/execute/930608-1.c: Add -std=gnu17.
* gcc.c-torture/execute/comp-goto-1.c: Add -std=gnu17.
* gcc.c-torture/execute/ieee/fp-cmp-1.x: Add -std=gnu17.
* gcc.c-torture/execute/ieee/fp-cmp-2.x: Add -std=gnu17.
* gcc.c-torture/execute/ieee/fp-cmp-3.x: Add -std=gnu17.
* gcc.c-torture/execute/ieee/fp-cmp-4.x: New file.
* gcc.c-torture/execute/ieee/fp-cmp-4f.x: New file.
* gcc.c-torture/execute/ieee/fp-cmp-4l.x: New file.
* gcc.c-torture/execute/loop-9.c: Add -std=gnu17.
* gcc.c-torture/execute/pr103209.c: Add -std=gnu17.
* gcc.c-torture/execute/pr28289.c: Add -std=gnu17.
* gcc.c-torture/execute/pr34982.c: Add -std=gnu17.
* gcc.c-torture/execute/pr67037.c: Add -std=gnu17.
* gcc.c-torture/execute/va-arg-2.c: Add -std=gnu17.
* gcc.dg/20010202-1.c: Add -std=gnu17.
* gcc.dg/20020430-1.c: Add -std=gnu17.
* gcc.dg/20031218-3.c: Add -std=gnu17.
* gcc.dg/20040127-1.c: Add -std=gnu17.
* gcc.dg/20041014-1.c: Add -Wno-old-style-definition.
* gcc.dg/20041122-1.c: Add -std=gnu17.
* gcc.dg/20050309-1.c: Add -std=gnu17.
* gcc.dg/20061026.c: Add -std=gnu17.
* gcc.dg/20101010-1.c: Add -std=gnu17.
* gcc.dg/Warray-parameter-10.c: Add -std=gnu17.
* gcc.dg/Wbuiltin-declaration-mismatch-2.c: Add -std=gnu17.
* gcc.dg/Wbuiltin-declaration-mismatch-3.c: Add -std=gnu17.
* gcc.dg/Wbuiltin-declaration-mismatch-4.c: Add -std=gnu17.
* gcc.dg/Wbuiltin-declaration-mismatch-5.c: Add -std=gnu17.
* gcc.dg/Wbuiltin-declaration-mismatch.c: Add -std=gnu17.
* gcc.dg/Wcxx-compat-2.c: Add -std=gnu17.
* gcc.dg/Wdouble-promotion.c: Add -std=gnu17.
* gcc.dg/Wfree-nonheap-object-7.c: Add -std=gnu17.
* gcc.dg/Wimplicit-int-1.c: Add -std=gnu17.
* gcc.dg/Wimplicit-int-1a.c: Add -std=gnu17.
* gcc.dg/Wimplicit-int-2.c: Add -std=gnu17.
* gcc.dg/Wimplicit-int-3.c: Add -std=gnu17.
* gcc.dg/Wimplicit-int-4.c: Add -std=gnu17.
* gcc.dg/Wimplicit-int-4a.c: Add -std=gnu17.
* gcc.dg/Wincompatible-pointer-types-1.c: Add -std=gnu17.
* gcc.dg/Wrestrict-19.c: Add -std=gnu17.
* gcc.dg/Wrestrict-4.c: Add -std=gnu17.
* gcc.dg/Wrestrict-5.c: Add -std=gnu17.
* gcc.dg/Wstrict-overflow-20.c: Add -std=gnu17.
* gcc.dg/Wstringop-overflow-13.c: Add -std=gnu17.
* gcc.dg/analyzer/doom-d_main-IdentifyVersion.c: Add -std=gnu17.
* gcc.dg/analyzer/doom-s_sound-pr108867.c: Add -std=gnu17.
* gcc.dg/analyzer/pr93032-mztools-signed-char.c: Add
-Wno-old-style-definition.
* gcc.dg/analyzer/pr93032-mztools-unsigned-char.c: Add
-Wno-old-style-definition.
* gcc.dg/analyzer/pr93355-localealias.c: Add
-Wno-old-style-definition.
* gcc.dg/analyzer/pr93375.c: Add -std=gnu17.
* gcc.dg/analyzer/pr94688.c: Add -std=gnu17.
* gcc.dg/analyzer/sensitive-1.c: Add -std=gnu17.
* gcc.dg/analyzer/torture/asm-x86-linux-wfx_get_ps_timeout-full.c:
Add -std=gnu17.
* gcc.dg/analyzer/torture/pr104863.c: Add -std=gnu17.
* gcc.dg/analyzer/torture/pr93379.c: Add -std=gnu17.
* gcc.dg/array-quals-2.c: Add -std=gnu17.
* gcc.dg/attr-invalid.c: Add -Wno-old-style-definition.
* gcc.dg/auto-init-uninit-A.c: Add -Wno-old-style-definition.
* gcc.dg/builtin-choose-expr.c: Declare exit with (int) prototype.
* gcc.dg/builtin-tgmath-err-1.c: Add -std=gnu17.
* gcc.dg/builtins-30.c: Add -std=gnu17.
* gcc.dg/cast-function-1.c: Add -std=gnu17.
* gcc.dg/cleanup-1.c: Add -std=gnu17.
* gcc.dg/compat/struct-complex-1_x.c: Add -std=gnu17.
* gcc.dg/compat/struct-complex-2_x.c: Add -std=gnu17.
* gcc.dg/compat/union-m128-1_x.c: Add -std=gnu17.
* gcc.dg/debug/dwarf2/pr66482.c: Add -std=gnu17.
* gcc.dg/dfp/composite-type-2.c: Add -std=gnu17.
* gcc.dg/dfp/composite-type.c: Add -std=gnu17.
* gcc.dg/dfp/keywords-pedantic.c: Add -std=gnu17.
* gcc.dg/dremf-type-compat-1.c: Add -std=gnu17.
* gcc.dg/dremf-type-compat-2.c: Add -std=gnu17.
* gcc.dg/dremf-type-compat-3.c: Add -std=gnu17.
* gcc.dg/dremf-type-compat-4.c: Add -std=gnu17.
* gcc.dg/enum-compat-1.c: Add -std=gnu17.
* gcc.dg/enum-compat-2.c: Add -std=gnu17.
* gcc.dg/floatn-errs.c: Add -std=gnu17.
* gcc.dg/fltconst-pedantic-dfp.c: Add -std=gnu17.
* gcc.dg/format/proto.c: Add -std=gnu17.
* gcc.dg/format/sentinel-1.c: Add -std=gnu17.
* gcc.dg/gomp/declare-simd-1.c: Add -Wno-old-style-definition.
* gcc.dg/ifelse-1.c: Add -Wno-old-style-definition.
* gcc.dg/inline-33.c: Add -std=gnu17.
* gcc.dg/ipa/inline-5.c: Add -std=gnu17.
* gcc.dg/ipa/ipa-sra-21.c: Add -std=gnu17.
* gcc.dg/ipa/pr102714.c: Add -std=gnu17.
* gcc.dg/ipa/pr104813.c: Add -std=gnu17.
* gcc.dg/ipa/pr108679.c: Add -std=gnu17.
* gcc.dg/ipa/pr42706.c: Add -std=gnu17.
* gcc.dg/ipa/pr88214.c: Add -Wno-old-style-definition.
* gcc.dg/ipa/pr91853.c: Add -Wno-old-style-definition.
* gcc.dg/ipa/pr93763.c: Add -std=gnu17.
* gcc.dg/ipa/pr96482-2.c: Add -std=gnu17.
* gcc.dg/lto/20091013-1_2.c: Add -std=gnu17.
* gcc.dg/lto/20091015-1_2.c: Add -std=gnu17.
* gcc.dg/lto/pr113197_1.c: Add -std=gnu17.
* gcc.dg/lto/pr54702_1.c: Add -std=gnu17.
* gcc.dg/lto/pr99849_0.c: Add -std=gnu17.
* gcc.dg/noncompile/920923-1.c: Add -std=gnu17.
* gcc.dg/noncompile/old-style-parm-1.c: Add
-Wno-old-style-definition.
* gcc.dg/noncompile/old-style-parm-3.c: Add
-Wno-old-style-definition.
* gcc.dg/noncompile/pr30552-2.c: Add -Wno-old-style-definition.
* gcc.dg/noncompile/pr30552-3.c: Add -std=gnu17.
* gcc.dg/noncompile/pr71265.c: Add -Wno-old-style-definition.
* gcc.dg/noncompile/pr79758-2.c: Add -Wno-old-style-definition.
* gcc.dg/noncompile/pr79758.c: Add -Wno-old-style-definition.
* gcc.dg/noncompile/va-arg-1.c: Add -std=gnu17.
* gcc.dg/old-style-prom-1.c: Add -std=gnu17.
* gcc.dg/old-style-prom-2.c: Add -std=gnu17.
* gcc.dg/old-style-prom-3.c: Add -std=gnu17.
* gcc.dg/old-style-then-proto-1.c: Add -std=gnu17.
* gcc.dg/parm-incomplete-1.c: Add -std=gnu17.
* gcc.dg/parm-mismatch-1.c: Add -std=gnu17.
* gcc.dg/permerror-default.c: Add -std=gnu17.
* gcc.dg/permerror-fpermissive-nowarning.c: Add -std=gnu17.
* gcc.dg/permerror-fpermissive.c: Add -std=gnu17.
* gcc.dg/permerror-noerror.c: Add -std=gnu17.
* gcc.dg/permerror-nowarning.c: Add -std=gnu17.
* gcc.dg/permerror-pedantic.c: Add -std=gnu17.
* gcc.dg/plugin/infoleak-net-ethtool-ioctl.c: Add -std=gnu17.
* gcc.dg/pointer-array-quals-1.c: Add -std=gnu17.
* gcc.dg/pointer-array-quals-2.c: Add -std=gnu17.
* gcc.dg/pr100791.c: Add -std=gnu17.
* gcc.dg/pr100843.c: Add -std=gnu17.
* gcc.dg/pr102273.c: Add -std=gnu17.
* gcc.dg/pr102385.c: Add -std=gnu17.
* gcc.dg/pr103222.c: Add -std=gnu17.
* gcc.dg/pr105140.c: Add -std=gnu17.
* gcc.dg/pr105150.c: Add -std=gnu17.
* gcc.dg/pr105250.c: Add -std=gnu17.
* gcc.dg/pr105972.c: Add -Wno-old-style-definition.
* gcc.dg/pr111039.c: Add -std=gnu17.
* gcc.dg/pr111407.c: Add -std=gnu17.
* gcc.dg/pr111922.c: Add -Wno-old-style-definition.
* gcc.dg/pr15236.c: Add -std=gnu17.
* gcc.dg/pr17188-1.c: Add -std=gnu17.
* gcc.dg/pr20368-1.c: Add -std=gnu17.
* gcc.dg/pr20368-2.c: Add -std=gnu17.
* gcc.dg/pr20368-3.c: Add -std=gnu17.
* gcc.dg/pr27331.c: Add -Wno-old-style-definition.
* gcc.dg/pr27861-1.c: Add -std=gnu17.
* gcc.dg/pr28121.c: Add -std=gnu17.
* gcc.dg/pr28243.c: Add -std=gnu17.
* gcc.dg/pr28888.c: Add -std=gnu17.
* gcc.dg/pr29254.c: Add -std=gnu17.
* gcc.dg/pr34457-1.c: Add -std=gnu17.
* gcc.dg/pr36015.c: Add -std=gnu17.
* gcc.dg/pr38245-3.c: Add -std=gnu17.
* gcc.dg/pr38245-4.c: Add -std=gnu17.
* gcc.dg/pr41241.c: Add -std=gnu17.
* gcc.dg/pr43058.c: Add -std=gnu17.
* gcc.dg/pr44539.c: Add -std=gnu17.
* gcc.dg/pr45055.c: Add -std=gnu17.
* gcc.dg/pr50908.c: Add -Wno-old-style-definition.
* gcc.dg/pr60647-1.c: Add -Wno-old-style-definition.
* gcc.dg/pr63762.c: Add -std=gnu17.
* gcc.dg/pr63804.c: Add -std=gnu17.
* gcc.dg/pr68306-3.c: Add -std=gnu17.
* gcc.dg/pr68533.c: Add -std=gnu17.
* gcc.dg/pr69156.c: Add -std=gnu17.
* gcc.dg/pr7356-2.c: Add -Wno-old-style-definition.
* gcc.dg/pr79983.c: Add -std=gnu17.
* gcc.dg/pr83463.c: Add -std=gnu17.
* gcc.dg/pr87347.c: Add -std=gnu17.
* gcc.dg/pr89521-1.c: Add -std=gnu17.
* gcc.dg/pr89521-2.c: Add -std=gnu17.
* gcc.dg/pr90648.c: Add -std=gnu17.
* gcc.dg/pr93573-1.c: Add -std=gnu17.
* gcc.dg/pr94167.c: Add -std=gnu17.
* gcc.dg/pr94705.c: Add -std=gnu17.
* gcc.dg/pr95118.c: Add -std=gnu17.
* gcc.dg/pr96335.c: Add -std=gnu17.
* gcc.dg/pr97830.c: Add -std=gnu17.
* gcc.dg/pr97882.c: Add -std=gnu17.
* gcc.dg/pr99122-2.c: Add -std=gnu17.
* gcc.dg/pr99122-3.c: Add -std=gnu17.
* gcc.dg/qual-component-1.c: Add -std=gnu17.
* gcc.dg/sibcall-6.c: Add -Wno-old-style-definition.
* gcc.dg/sms-2.c: Add -Wno-old-style-definition.
* gcc.dg/tm/20091221.c: Add -std=gnu17.
* gcc.dg/torture/bfloat16-basic.c: Add -Wno-old-style-definition.
* gcc.dg/torture/float128-basic.c: Add -Wno-old-style-definition.
* gcc.dg/torture/float128x-basic.c: Add -Wno-old-style-definition.
* gcc.dg/torture/float16-basic.c: Add -Wno-old-style-definition.
* gcc.dg/torture/float32-basic.c: Add -Wno-old-style-definition.
* gcc.dg/torture/float32x-basic.c: Add -Wno-old-style-definition.
* gcc.dg/torture/float64-basic.c: Add -Wno-old-style-definition.
* gcc.dg/torture/float64x-basic.c: Add -Wno-old-style-definition.
* gcc.dg/torture/pr102762.c: Add -std=gnu17.
* gcc.dg/torture/pr103987.c: Add -std=gnu17.
* gcc.dg/torture/pr104825.c: Add -Wno-old-style-definition.
* gcc.dg/torture/pr105166.c: Add -std=gnu17.
* gcc.dg/torture/pr105185.c: Add -Wno-old-style-definition.
* gcc.dg/torture/pr109652.c: Add -std=gnu17.
* gcc.dg/torture/pr112444.c: Add -std=gnu17.
* gcc.dg/torture/pr113895-3.c: Add -std=gnu17.
* gcc.dg/torture/pr24626-2.c: Add -std=gnu17.
* gcc.dg/torture/pr25183.c: Add -std=gnu17.
* gcc.dg/torture/pr38948.c: Add -std=gnu17.
* gcc.dg/torture/pr44807.c: Add -std=gnu17.
* gcc.dg/torture/pr47281.c: Add -std=gnu17.
* gcc.dg/torture/pr47958-1.c: Add -Wno-old-style-definition.
* gcc.dg/torture/pr48063.c: Add -std=gnu17.
* gcc.dg/torture/pr57036-1.c: Add -std=gnu17.
* gcc.dg/torture/pr57330.c: Add -std=gnu17.
* gcc.dg/torture/pr57584.c: Add -std=gnu17.
* gcc.dg/torture/pr67741.c: Add -std=gnu17.
* gcc.dg/torture/pr68104.c: Add -std=gnu17.
* gcc.dg/torture/pr69242.c: Add -std=gnu17.
* gcc.dg/torture/pr70457.c: Add -std=gnu17.
* gcc.dg/torture/pr70985.c: Add -std=gnu17.
* gcc.dg/torture/pr71606.c: Add -std=gnu17.
* gcc.dg/torture/pr71816.c: Add -std=gnu17.
* gcc.dg/torture/pr77286.c: Add -std=gnu17.
* gcc.dg/torture/pr77646.c: Add -std=gnu17.
* gcc.dg/torture/pr77677-2.c: Add -std=gnu17.
* gcc.dg/torture/pr78365.c: Add -Wno-old-style-definition.
* gcc.dg/torture/pr79732.c: Add -std=gnu17.
* gcc.dg/torture/pr80612.c: Add -std=gnu17.
* gcc.dg/torture/pr80764.c: Add -std=gnu17.
* gcc.dg/torture/pr80842.c: Add -std=gnu17.
* gcc.dg/torture/pr81900.c: Add -std=gnu17.
* gcc.dg/torture/pr82276.c: Add -std=gnu17.
* gcc.dg/torture/pr84803.c: Add -std=gnu17.
* gcc.dg/torture/pr93124.c: Add -std=gnu17.
* gcc.dg/torture/pr97330-1.c: Add -Wno-old-style-definition.
* gcc.dg/tree-prof/comp-goto-1.c: Add -std=gnu17.
* gcc.dg/tree-ssa/20030703-2.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030708-1.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030709-2.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030709-3.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030710-1.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030711-1.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030711-2.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030711-3.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030714-1.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030714-2.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030728-1.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030807-10.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030807-11.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030807-3.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030807-6.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030807-7.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030814-4.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030814-5.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030814-6.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20030918-1.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/20040514-2.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/loadpre7.c: Add -Wno-old-style-definition.
* gcc.dg/tree-ssa/pr111003.c: Add -std=gnu17.
* gcc.dg/tree-ssa/pr115128.c: Add -std=gnu17.
* gcc.dg/tree-ssa/pr115191.c: Add -std=gnu17.
* gcc.dg/tree-ssa/pr24840.c: Add -std=gnu17.
* gcc.dg/tree-ssa/pr69666.c: Add -std=gnu17.
* gcc.dg/tree-ssa/pr70232.c: Add -std=gnu17.
* gcc.dg/ubsan/pr79757-1.c: Add -Wno-old-style-definition.
* gcc.dg/ubsan/pr79757-2.c: Add -Wno-old-style-definition.
* gcc.dg/ubsan/pr79757-3.c: Add -Wno-old-style-definition.
* gcc.dg/ubsan/pr81223.c: Add -std=gnu17.
* gcc.dg/uninit-10-O0.c: Add -Wno-old-style-definition.
* gcc.dg/uninit-10.c: Add -Wno-old-style-definition.
* gcc.dg/uninit-32.c: Add -std=gnu17.
* gcc.dg/uninit-41.c: Add -std=gnu17.
* gcc.dg/uninit-A-O0.c: Add -Wno-old-style-definition.
* gcc.dg/uninit-A.c: Add -Wno-old-style-definition.
* gcc.dg/unused-1.c: Add -Wno-old-style-definition.
* gcc.dg/vect/bb-slp-pr114249.c: Add -std=gnu17.
* gcc.dg/vect/bb-slp-pr97486.c: Add -std=gnu17.
* gcc.dg/vect/bb-slp-subgroups-1.c: Add -std=gnu17.
* gcc.dg/vect/bb-slp-subgroups-2.c: Add -std=gnu17.
* gcc.dg/vect/bb-slp-subgroups-3.c: Add -std=gnu17.
* gcc.dg/vect/vect-early-break_111-pr113731.c: Add -std=gnu17.
* gcc.dg/vect/vect-early-break_122-pr114239.c: Add -std=gnu17.
* gcc.dg/vect/vect-multi-peel-gaps.c: Add -std=gnu17.
* gcc.dg/vla-stexp-2.c: Add -std=gnu17.
* gcc.dg/warn-1.c: Add -Wno-old-style-definition.
* gcc.dg/winline-10.c: Add -Wno-old-style-definition.
* gcc.dg/wtr-label-1.c: Add -Wno-old-style-definition.
* gcc.dg/wtr-switch-1.c: Add -Wno-old-style-definition.
* gcc.target/i386/excess-precision-3.c: Add
-Wno-old-style-definition.
* gcc.target/i386/fma4-256-nmsubXX.c: Add -std=gnu17.
* gcc.target/i386/fma4-nmsubXX.c: Add -std=gnu17.
* gcc.target/i386/nop-mcount.c: Add -Wno-old-style-definition.
* gcc.target/i386/pr102627.c: Add -std=gnu17.
* gcc.target/i386/pr106994.c: Add -std=gnu17.
* gcc.target/i386/pr68349.c: Add -std=gnu17.
* gcc.target/i386/pr97313.c: Add -std=gnu17.
* gcc.target/i386/pr99454.c: Add -std=gnu17.
* gcc.target/i386/record-mcount.c: Add -Wno-old-style-definition.
libffi/
* testsuite/libffi.call/va_struct2.c (test_fn): Cast n to void.
* testsuite/libffi.call/va_struct3.c (test_fn): Likewise.
Backported from <https://github.com/libffi/libffi/pull/861>.
|
|
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/flex-without-call-summaries.c: Add missing brace.
* c-c++-common/analyzer/malloc-callbacks.c: Ditto.
* gcc.dg/Wstringop-overflow-79.c: Ditto.
* gcc.dg/Wstringop-overflow-80.c: Ditto.
|
|
Various diagnostics build an intermediate string, potentially with
colorization, and then use this in a diagnostic message.
This won't work if we have multiple diagnostic sinks, where some might
be colorized and some not.
This patch reworks such places using "%e" and pp_element subclasses, so
that any colorization happens within report_diagnostic's call to
pp_format.
gcc/analyzer/ChangeLog:
PR other/116613
* kf-analyzer.cc: Include "pretty-print-markup.h".
(kf_analyzer_dump_escaped::impl_call_pre): Defer colorization
choices by eliminating the construction of a intermediate string,
replacing it with a new pp_element subclass via "%e".
gcc/ChangeLog:
PR other/116613
* attribs.cc: Include "pretty-print-markup.h".
(decls_mismatched_attributes): Defer colorization choices by
replacing printing to a pretty_printer * param with appending
to a vec of strings.
(maybe_diag_alias_attributes): As above, replacing pretty_printer
with usage of pp_markup::comma_separated_quoted_strings and "%e"
in two places.
* attribs.h (decls_mismatched_attributes): Update decl.
* gimple-ssa-warn-access.cc: Include "pretty-print-markup.h".
(pass_waccess::maybe_warn_memmodel): Defer colorization choices by
replacing printing to a pretty_printer * param with use of
pp_markup::comma_separated_quoted_strings and "%e".
(pass_waccess::maybe_warn_memmodel): Likewise, replacing printing
to a temporary buffer.
* pretty-print-markup.h
(class pp_markup::comma_separated_quoted_strings): New.
* pretty-print.cc
(pp_markup::comma_separated_quoted_strings::add_to_phase_2): New.
(selftest::test_pp_printf_within_pp_element): New.
(selftest::test_comma_separated_quoted_strings): New.
(selftest::pretty_print_cc_tests): Call the new tests.
gcc/cp/ChangeLog:
PR other/116613
* pt.cc: Include "pretty-print-markup.h".
(warn_spec_missing_attributes): Defer colorization choices by
replacing printing to a pretty_printer * param with appending
to a vec of strings. Replace pretty_printer with usage of
pp_markup::comma_separated_quoted_strings and "%e".
gcc/testsuite/ChangeLog:
PR other/116613
* c-c++-common/analyzer/escaping-1.c: Update expected results to
remove type information from C++ results. Previously we were
using %qD with default_tree_printer, which used
lang_hooks.decl_printable_name, whereas now we're using %qD with
a clone of the cxx_pretty_printer.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
Several C++ tests fail with --disable-hosted-libstdcxx, whether
because stdc++exp gets linked in despite not being built, because
standard headers are included but that are unavailable in this mode,
or because headers are (mistakenly?) expected to introduce
declarations such as for abort, malloc, etc, but in this mode they
don't.
This patch introduces an effective target for GCC test, equivalent to
one that's available in the libstdc++-v3 testsuite, and arranges for
all such tests to be skipped when libstdc++-v3 is not hosted.
Co-Authored-By: Olivier Hainque <hainque@adacore.com>
for gcc/ChangeLog
* doc/sourcebuild.texi (hostedlib): New effective target.
for gcc/testsuite/ChangeLog
* lib/target-supports.exp (check_effective_target_hostedlib):
New.
* g++.dg/contracts/contracts-access1.C: Skip if !hostedlib
because of libstdc++exp.
* g++.dg/contracts/contracts-assume3.C: Likewise.
* g++.dg/contracts/contracts-assume4.C: Likewise.
* g++.dg/contracts/contracts-config1.C: Likewise.
* g++.dg/contracts/contracts-constexpr1.C: Likewise.
* g++.dg/contracts/contracts-deduced2.C: Likewise.
* g++.dg/contracts/contracts-externC.C: Likewise.
* g++.dg/contracts/contracts-friend1.C: Likewise.
* g++.dg/contracts/contracts-multiline1.C: Likewise.
* g++.dg/contracts/contracts-nested-class2.C: Likewise.
* g++.dg/contracts/contracts-post2.C: Likewise.
* g++.dg/contracts/contracts-post3.C: Likewise.
* g++.dg/contracts/contracts-pre2a2.C: Likewise.
* g++.dg/contracts/contracts10.C: Likewise.
* g++.dg/contracts/contracts18.C: Likewise.
* g++.dg/contracts/contracts19.C: Likewise.
* g++.dg/contracts/contracts2.C: Likewise.
* g++.dg/contracts/contracts24.C: Likewise.
* g++.dg/contracts/contracts25.C: Likewise.
* g++.dg/contracts/contracts3.C: Likewise.
* g++.dg/contracts/contracts4.C: Likewise.
* g++.dg/contracts/contracts5.C: Likewise.
* g++.dg/contracts/contracts6.C: Likewise.
* g++.dg/contracts/contracts7.C: Likewise.
* g++.dg/contracts/contracts9.C: Likewise.
* g++.dg/contracts/pr110159.C: Likewise.
* g++.dg/contracts/pr115434.C: Likewise. Adjust line numbers.
* c-c++-common/pr36513-2.c: Skip if !hostedlib because of
unavailable headers.
* c-c++-common/analyzer/pr93290.c: Likewise.
* g++.dg/analyzer/pr93212.C: Likewise.
* g++.dg/analyzer/vfunc-2.C: Likewise.
* g++.dg/cdce3.C: Likewise. Adjust line numbers.
* g++.dg/concepts/expression.C: Likewise.
* g++.dg/concepts/fn3.C: Likewise.
* g++.dg/concepts/fn9.C: Likewise.
* g++.dg/concepts/generic-fn.C: Likewise.
* g++.dg/contracts/contracts-assume2.C: Likewise.
* g++.dg/contracts/contracts-ignore2.C: Likewise.
* g++.dg/contracts/contracts-post7.C: Likewise.
* g++.dg/contracts/contracts-pre10.C: Likewise.
* g++.dg/contracts/contracts-pre2.C: Likewise.
* g++.dg/contracts/contracts-pre3.C: Likewise.
* g++.dg/contracts/contracts-pre4.C: Likewise.
* g++.dg/contracts/contracts-pre5.C: Likewise.
* g++.dg/contracts/contracts-pre7.C: Likewise.
* g++.dg/contracts/contracts-pre9.C: Likewise.
* g++.dg/contracts/contracts-redecl3.C: Likewise.
* g++.dg/contracts/contracts-redecl4.C: Likewise.
* g++.dg/contracts/contracts-redecl6.C: Likewise.
* g++.dg/contracts/contracts-redecl7.C: Likewise.
* g++.dg/contracts/contracts-tmpl-spec1.C: Likewise.
* g++.dg/contracts/contracts-tmpl-spec2.C: Likewise.
* g++.dg/contracts/contracts-tmpl-spec3.C: Likewise.
* g++.dg/contracts/contracts14.C: Likewise.
* g++.dg/contracts/contracts15.C: Likewise.
* g++.dg/contracts/contracts16.C: Likewise.
* g++.dg/contracts/contracts17.C: Likewise.
* g++.dg/contracts/contracts22.C: Likewise.
* g++.dg/contracts/contracts35.C: Likewise.
* g++.dg/coroutines/pr100611.C: Likewise.
* g++.dg/coroutines/pr100772-b.C: Likewise.
* g++.dg/coroutines/pr101133.C: Likewise.
* g++.dg/coroutines/pr101367.C: Likewise.
* g++.dg/coroutines/pr101976.C: Likewise.
* g++.dg/coroutines/pr102454.C: Likewise.
* g++.dg/coroutines/pr104051.C: Likewise.
* g++.dg/coroutines/pr110635.C: Likewise.
* g++.dg/coroutines/pr110871.C: Likewise. Adjust line numbers.
* g++.dg/coroutines/pr110872.C: Likewise. Likewise.
* g++.dg/coroutines/pr94288.C: Likewise.
* g++.dg/coroutines/pr95520.C: Likewise.
* g++.dg/coroutines/pr95736.C: Likewise.
* g++.dg/coroutines/pr97587.C: Likewise.
* g++.dg/coroutines/pr99576_1.C: Likewise.
* g++.dg/coroutines/pr99576_2.C: Likewise.
* g++.dg/coroutines/ramp-return-a.C: Likewise.
* g++.dg/coroutines/ramp-return-b.C: Likewise.
* g++.dg/coroutines/ramp-return-c.C: Likewise.
* g++.dg/coroutines/symmetric-transfer-00-basic.C: Likewise.
* g++.dg/coroutines/torture/co-await-16-template-traits.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-15-default-return_void.C:
Likewise.
* g++.dg/coroutines/torture/co-yield-04-complex-local-state.C:
Likewise.
* g++.dg/coroutines/torture/extern-c-coroutine.C: Likewise.
* g++.dg/coroutines/torture/func-params-08.C: Likewise.
* g++.dg/coroutines/torture/func-params-09-awaitable-parms.C:
Likewise.
* g++.dg/coroutines/torture/local-var-05-awaitable.C:
Likewise.
* g++.dg/coroutines/torture/pr95615-01.C: Likewise.
* g++.dg/coroutines/torture/pr95615-02.C: Likewise.
* g++.dg/coroutines/torture/pr95615-03.C: Likewise.
* g++.dg/coroutines/torture/pr95615-04.C: Likewise.
* g++.dg/coroutines/torture/pr95615-05.C: Likewise.
* g++.dg/coroutines/torture/pr98704.C: Likewise.
* g++.dg/cpp/pr80005.C: Likewise.
* g++.dg/cpp0x/Wliteral-suffix.C: Likewise.
* g++.dg/cpp0x/Wpessimizing-move2.C: Likewise.
* g++.dg/cpp0x/constexpr-70001-3.C: Likewise.
* g++.dg/cpp0x/constexpr-ice16.C: Likewise.
* g++.dg/cpp0x/dc5.C: Likewise.
* g++.dg/cpp0x/enum35.C: Likewise.
* g++.dg/cpp0x/enum36.C: Likewise.
* g++.dg/cpp0x/initlist-opt1.C: Likewise.
* g++.dg/cpp0x/initlist-vect2.C: Likewise.
* g++.dg/cpp0x/initlist13.C: Likewise.
* g++.dg/cpp0x/initlist15.C: Likewise.
* g++.dg/cpp0x/initlist25.C: Likewise.
* g++.dg/cpp0x/initlist54.C: Likewise.
* g++.dg/cpp0x/initlist92.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-capture-const-ref.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-const-neg.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-const.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-deduce.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-in-class-neg.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-in-class.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-mixed.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-mutable.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-nested.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-non-const.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-nop.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-nullptr.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-pass.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-recursive.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-ref-default.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-ref.C: Likewise.
* g++.dg/cpp0x/nullptr20.C: Likewise.
* g++.dg/cpp0x/pr61038.C: Likewise.
* g++.dg/cpp0x/rv-trivial-bug.C: Likewise.
* g++.dg/cpp0x/udlit-concat-neg.C: Likewise.
* g++.dg/cpp0x/udlit-concat.C: Likewise.
* g++.dg/cpp0x/udlit-embed-quote.C: Likewise.
* g++.dg/cpp0x/udlit-extended-id-1.C: Likewise.
* g++.dg/cpp0x/udlit-general.C: Likewise.
* g++.dg/cpp0x/udlit-namespace.C: Likewise.
* g++.dg/cpp0x/udlit-raw-op.C: Likewise.
* g++.dg/cpp0x/udlit-raw-str.C: Likewise.
* g++.dg/cpp0x/udlit-resolve-char8_t.C: Likewise.
* g++.dg/cpp0x/udlit-resolve.C: Likewise.
* g++.dg/cpp0x/udlit-sfinae.C: Likewise.
* g++.dg/cpp0x/udlit-string-literal.C: Likewise.
* g++.dg/cpp0x/udlit-suffix-neg.C: Likewise.
* g++.dg/cpp1y/udlit-userdef-string.C: Likewise.
* g++.dg/cpp0x/udlit-template.C: Likewise.
* g++.dg/cpp0x/variadic-bind.C: Likewise.
* g++.dg/cpp0x/variadic-function.C: Likewise.
* g++.dg/cpp0x/variadic-mem_fn.C: Likewise.
* g++.dg/cpp0x/variadic-tuple.C: Likewise.
* g++.dg/cpp1y/auto-fn45.C: Likewise.
* g++.dg/cpp1y/complex_literals1.C: Likewise.
* g++.dg/cpp1y/complex_literals1a.C: Likewise.
* g++.dg/cpp1y/constexpr-66093.C: Likewise.
* g++.dg/cpp1y/constexpr-assert1.C: Likewise.
* g++.dg/cpp1y/constexpr-assert2.C: Likewise.
* g++.dg/cpp1y/feat-cxx14.C: Likewise.
* g++.dg/cpp1y/lambda-generic-69078-2.C: Likewise.
* g++.dg/cpp1y/lambda-generic-x.C: Likewise.
* g++.dg/cpp1y/lambda-init8.C: Likewise.
* g++.dg/cpp1y/new2.C: Likewise.
* g++.dg/cpp1y/nsdmi-aggr12.C: Likewise.
* g++.dg/cpp1y/pr57640.C: Likewise.
* g++.dg/cpp1y/pr77786.C: Likewise.
* g++.dg/cpp1y/pr95226.C: Likewise.
* g++.dg/cpp1y/udlit-char-template-sfinae.C: Likewise.
* g++.dg/cpp1y/udlit-char-template-vs-std-literal-operator.C:
Likewise.
* g++.dg/cpp1z/class-deduction14.C: Likewise.
* g++.dg/cpp1z/constexpr-asm-1.C: Likewise.
* g++.dg/cpp1z/constexpr-asm-3.C: Likewise.
* g++.dg/cpp1z/decomp37.C: Likewise.
* g++.dg/cpp1z/eval-order2.C: Likewise.
* g++.dg/cpp1z/feat-cxx1z.C: Likewise.
* g++.dg/cpp1z/fold1.C: Likewise.
* g++.dg/cpp1z/init-statement6.C: Likewise.
* g++.dg/cpp1z/launder3.C: Likewise.
* g++.dg/cpp1z/launder4.C: Likewise.
* g++.dg/cpp1z/launder5.C: Likewise.
* g++.dg/cpp1z/launder6.C: Likewise.
* g++.dg/cpp1z/utf8.C: Likewise.
* g++.dg/cpp23/ext-floating12.C: Likewise.
* g++.dg/cpp23/feat-cxx2b.C: Likewise.
* g++.dg/cpp26/constexpr-voidptr1.C: Likewise.
* g++.dg/cpp26/feat-cxx26.C: Likewise.
* g++.dg/cpp2a/concepts-cmath.C: Likewise.
* g++.dg/cpp2a/concepts-explicit-spec1.C: Likewise.
* g++.dg/cpp2a/concepts-explicit-spec4.C: Likewise.
* g++.dg/cpp2a/concepts-explicit-spec5.C: Likewise.
* g++.dg/cpp2a/concepts-memfun.C: Likewise.
* g++.dg/cpp2a/concepts-pr67774.C: Likewise.
* g++.dg/cpp2a/cond-triv2.C: Likewise.
* g++.dg/cpp2a/feat-cxx2a.C: Likewise.
* g++.dg/cpp2a/nontype-float1.C: Likewise.
* g++.dg/diagnostic/disable.C: Likewise.
* g++.dg/diagnostic/missing-header-pr110164.C: Likewise.
* g++.dg/diagnostic/pr65923.C: Likewise.
* g++.dg/eh/arm-vfp-unwind.C: Likewise.
* g++.dg/eh/crossjump1.C: Likewise.
* g++.dg/eh/omit-frame-pointer.C: Likewise.
* g++.dg/eh/simd-3.C: Likewise.
* g++.dg/ext/bases.C: Likewise.
* g++.dg/ext/builtin-line1.C: Likewise.
* g++.dg/ext/builtin10.C: Likewise.
* g++.dg/ext/complex4.C: Likewise.
* g++.dg/ext/has_nothrow_assign.C: Likewise.
* g++.dg/ext/has_nothrow_assign_odr.C: Likewise.
* g++.dg/ext/has_nothrow_constructor.C: Likewise.
* g++.dg/ext/has_nothrow_constructor_odr.C: Likewise.
* g++.dg/ext/has_nothrow_copy-1.C: Likewise.
* g++.dg/ext/has_nothrow_copy-2.C: Likewise.
* g++.dg/ext/has_nothrow_copy-3.C: Likewise.
* g++.dg/ext/has_nothrow_copy-4.C: Likewise.
* g++.dg/ext/has_nothrow_copy-5.C: Likewise.
* g++.dg/ext/has_nothrow_copy-6.C: Likewise.
* g++.dg/ext/has_nothrow_copy-7.C: Likewise.
* g++.dg/ext/has_nothrow_copy_odr.C: Likewise.
* g++.dg/ext/has_trivial_assign.C: Likewise.
* g++.dg/ext/has_trivial_constructor.C: Likewise.
* g++.dg/ext/has_trivial_copy.C: Likewise.
* g++.dg/ext/has_trivial_destructor-1.C: Likewise.
* g++.dg/ext/has_virtual_destructor.C: Likewise.
* g++.dg/ext/is_abstract.C: Likewise.
* g++.dg/ext/is_aggregate.C: Likewise.
* g++.dg/ext/is_base_of.C: Likewise.
* g++.dg/ext/is_class.C: Likewise.
* g++.dg/ext/is_convertible2.C: Likewise.
* g++.dg/ext/is_empty.C: Likewise.
* g++.dg/ext/is_enum.C: Likewise.
* g++.dg/ext/is_pod.C: Likewise.
* g++.dg/ext/is_polymorphic.C: Likewise.
* g++.dg/ext/is_union.C: Likewise.
* g++.dg/ext/underlying_type10.C: Likewise.
* g++.dg/ext/underlying_type4.C: Likewise.
* g++.dg/gcov/gcov-14.C: Likewise.
* g++.dg/gcov/gcov-18.C: Likewise.
* g++.dg/gcov/pr88045.C: Likewise.
* g++.dg/gcov/pr88263-2.C: Likewise.
* g++.dg/gcov/pr88263.C: Likewise.
* g++.dg/gomp/has_device_addr-non-lvalue-1.C: Likewise.
* g++.dg/gomp/ind-base-3.C: Likewise.
* g++.dg/gomp/map-assignment-1.C: Likewise.
* g++.dg/gomp/map-lvalue-ref-1.C: Likewise.
* g++.dg/gomp/map-ptrmem-1.C: Likewise.
* g++.dg/gomp/map-ptrmem-2.C: Likewise.
* g++.dg/gomp/map-static-cast-lvalue-1.C: Likewise.
* g++.dg/gomp/map-ternary-1.C: Likewise.
* g++.dg/gomp/member-array-2.C: Likewise.
* g++.dg/gomp/pr71910.C: Likewise.
* g++.dg/gomp/pr91118-1.C: Likewise.
* g++.dg/gomp/sink-2.C: Likewise.
* g++.dg/gomp/target-this-3.C: Likewise.
* g++.dg/gomp/target-this-4.C: Likewise.
* g++.dg/gomp/tile-1.C: Likewise.
* g++.dg/gomp/tile-2.C: Likewise.
* g++.dg/gomp/unroll-1.C: Likewise.
* g++.dg/gomp/unroll-2.C: Likewise.
* g++.dg/gomp/unroll-3.C: Likewise.
* g++.dg/graphite/id-1.C: Likewise.
* g++.dg/graphite/pr42130.C: Likewise.
* g++.dg/inherit/virtual8.C: Likewise.
* g++.dg/init/array4.C: Likewise.
* g++.dg/init/new18.C: Likewise.
* g++.dg/init/new39.C: Likewise.
* g++.dg/init/new40.C: Likewise.
* g++.dg/ipa/devirt-29.C: Likewise.
* g++.dg/ipa/pr85549.C: Likewise.
* g++.dg/lookup/missing-std-include-3.C: Likewise.
* g++.dg/lookup/pr21802.C: Likewise.
* g++.dg/lto/20091022-2_0.C: Likewise.
* g++.dg/lto/20091219_0.C: Likewise.
* g++.dg/lto/pr80287_0.C: Likewise.
* g++.dg/lto/pr89358_0.C: Likewise.
* g++.dg/lto/pr89358_1.C: Likewise.
* g++.dg/modules/binding-1_a.H: Likewise.
* g++.dg/modules/binding-1_b.H: Likewise.
* g++.dg/modules/contracts-1_a.C: Likewise.
* g++.dg/modules/contracts-1_b.C: Likewise.
* g++.dg/modules/contracts-2_a.C: Likewise.
* g++.dg/modules/contracts-2_b.C: Likewise.
* g++.dg/modules/contracts-3_a.C: Likewise.
* g++.dg/modules/contracts-3_b.C: Likewise.
* g++.dg/modules/contracts-4_a.C: Likewise.
* g++.dg/modules/contracts-4_d.C: Likewise.
* g++.dg/modules/global-3_a.C: Likewise.
* g++.dg/modules/hello-1_a.C: Likewise.
* g++.dg/modules/hello-2_a.C: Likewise.
* g++.dg/modules/hello-2_b.C: Likewise.
* g++.dg/modules/iostream-1_a.H: Likewise.
* g++.dg/modules/p1689-2.C: Likewise.
* g++.dg/modules/part-5_c.C: Likewise.
* g++.dg/modules/pr99023_a.X: Likewise.
* g++.dg/modules/pr99166_a.X: Likewise.
* g++.dg/modules/pr99166_b.C: Likewise.
* g++.dg/modules/pr99425-2_a.X: Likewise.
* g++.dg/modules/pr99425-2_b.X: Likewise.
* g++.dg/modules/string-1_a.H: Likewise.
* g++.dg/modules/string-1_b.C: Likewise.
* g++.dg/modules/string-view1.C: Likewise.
* g++.dg/modules/xtreme-header-1_a.H: Likewise.
* g++.dg/modules/xtreme-header-1_b.C: Likewise.
* g++.dg/modules/xtreme-header-2_a.H: Likewise.
* g++.dg/modules/xtreme-header-2_b.C: Likewise.
* g++.dg/modules/xtreme-header-3_a.H: Likewise.
* g++.dg/modules/xtreme-header-3_b.C: Likewise.
* g++.dg/modules/xtreme-header-4_a.H: Likewise.
* g++.dg/modules/xtreme-header-4_b.C: Likewise.
* g++.dg/modules/xtreme-header-5_a.H: Likewise.
* g++.dg/modules/xtreme-header-5_b.C: Likewise.
* g++.dg/modules/xtreme-header-6_a.H: Likewise.
* g++.dg/modules/xtreme-header-6_b.C: Likewise.
* g++.dg/modules/xtreme-header-7_a.H: Likewise.
* g++.dg/modules/xtreme-header-7_b.C: Likewise.
* g++.dg/modules/xtreme-header_a.H: Likewise.
* g++.dg/modules/xtreme-header_b.C: Likewise.
* g++.dg/modules/xtreme-tr1_a.H: Likewise.
* g++.dg/modules/xtreme-tr1_b.C: Likewise.
* g++.dg/opt/builtins2.C: Likewise.
* g++.dg/opt/dtor4-aux.cc: Likewise.
* g++.dg/opt/dtor4.C: Likewise.
* g++.dg/opt/nrv17.C: Likewise.
* g++.dg/opt/pr102970.C: Likewise.
* g++.dg/opt/pr109434.C: Likewise.
* g++.dg/opt/pr110879.C: Likewise.
* g++.dg/opt/pr15551.C: Likewise.
* g++.dg/opt/pr30965.C: Likewise.
* g++.dg/opt/pr65074.C: Likewise.
* g++.dg/opt/pr66119.C: Likewise.
* g++.dg/opt/pr77844.C: Likewise.
* g++.dg/opt/pr85393.C: Likewise.
* g++.dg/opt/pr94223.C: Likewise.
* g++.dg/other/final7.C: Likewise.
* g++.dg/other/pr40561.C: Likewise.
* g++.dg/parse/lookup1.C: Likewise.
* g++.dg/parse/parse5.C: Likewise.
* g++.dg/pch/system-1.C: Likewise.
* g++.dg/pch/system-1.Hs: Likewise.
* g++.dg/pch/system-2.C: Likewise.
* g++.dg/pch/system-2.Hs: Likewise.
* g++.dg/pr100253.C: Likewise.
* g++.dg/pr104547.C: Likewise.
* g++.dg/pr107087.C: Likewise.
* g++.dg/pr71488.C: Likewise.
* g++.dg/pr71655.C: Likewise.
* g++.dg/pr79095-3.C: Likewise.
* g++.dg/pr83239.C: Likewise.
* g++.dg/pr99966.C: Likewise.
* g++.dg/rtti/typeid4.C: Likewise.
* g++.dg/spellcheck-inttypes.C: Likewise.
* g++.dg/template/friend10.C: Likewise.
* g++.dg/template/pr69961a.C: Likewise.
* g++.dg/template/show-template-tree-3.C: Likewise.
* g++.dg/tm/inherit2.C: Likewise.
* g++.dg/tm/pr46270.C: Likewise.
* g++.dg/torture/alias-1.C: Likewise.
* g++.dg/torture/builtin-location.C: Likewise.
* g++.dg/torture/pr103669.C: Likewise.
* g++.dg/torture/pr104601.C: Likewise.
* g++.dg/torture/pr106922.C: Likewise.
* g++.dg/torture/pr111019.C: Likewise.
* g++.dg/torture/pr33572.C: Likewise.
* g++.dg/torture/pr33735.C: Likewise.
* g++.dg/torture/pr34099.C: Likewise.
* g++.dg/torture/pr39417.C: Likewise.
* g++.dg/torture/pr44972.C: Likewise.
* g++.dg/torture/pr46364.C: Likewise.
* g++.dg/torture/pr49628.C: Likewise.
* g++.dg/torture/pr49938.C: Likewise.
* g++.dg/torture/pr51903.C: Likewise.
* g++.dg/torture/pr54498.C: Likewise.
* g++.dg/torture/pr60750.C: Likewise.
* g++.dg/torture/pr67600.C: Likewise.
* g++.dg/torture/pr82084.C: Likewise.
* g++.dg/torture/pr86763.C: Likewise.
* g++.dg/torture/pr95493-1.C: Likewise.
* g++.dg/tree-ssa/allocator-opt1.C: Likewise.
* g++.dg/tree-ssa/copyprop.C: Likewise.
* g++.dg/tree-ssa/empty-loop.C: Likewise.
* g++.dg/tree-ssa/initlist-opt1.C: Likewise.
* g++.dg/tree-ssa/initlist-opt2.C: Likewise.
* g++.dg/tree-ssa/initlist-opt3.C: Likewise.
* g++.dg/tree-ssa/initlist-opt5.C: Likewise.
* g++.dg/tree-ssa/loop-cond-split-1.C: Likewise.
* g++.dg/tree-ssa/loop-split-1.C: Likewise.
* g++.dg/tree-ssa/pr101839.C: Likewise.
* g++.dg/tree-ssa/pr104529.C: Likewise.
* g++.dg/tree-ssa/pr109849.C: Likewise.
* g++.dg/tree-ssa/pr14703.C: Likewise.
* g++.dg/tree-ssa/pr19786.C: Likewise.
* g++.dg/tree-ssa/pr46228.C: Likewise.
* g++.dg/tree-ssa/pr63841.C: Likewise.
* g++.dg/tree-ssa/pr69336.C: Likewise.
* g++.dg/tree-ssa/pr78847.C: Likewise.
* g++.dg/tree-ssa/pr95638.C: Likewise.
* g++.dg/uninit-pr105937.C: Likewise.
* g++.dg/vect/pr102421.cc: Likewise.
* g++.dg/vect/pr105053.cc: Likewise.
* g++.dg/vect/pr33426-ivdep-4.cc: Likewise.
* g++.dg/vect/pr64410.cc: Likewise.
* g++.dg/vect/slp-pr87105.cc: Likewise.
* g++.dg/vect/vect-novector-pragma.cc: Likewise.
* g++.dg/warn/Warray-bounds-27.C: Likewise.
* g++.dg/warn/Wdangling-pointer-pr110055.C: Likewise.
* g++.dg/warn/Wdangling-reference10.C: Likewise.
* g++.dg/warn/Wdangling-reference14.C: Likewise.
* g++.dg/warn/Wdangling-reference17.C: Likewise.
* g++.dg/warn/Wdangling-reference4.C: Likewise.
* g++.dg/warn/Wdangling-reference5.C: Likewise.
* g++.dg/warn/Wfree-nonheap-object-3.C: Likewise.
* g++.dg/warn/Winline-3.C: Likewise.
* g++.dg/warn/Wmemset-elt-size1.C: Likewise.
* g++.dg/warn/Wparentheses-34.C: Likewise.
* g++.dg/warn/Wstrict-aliasing-bogus-escape-2.C: Likewise.
* g++.dg/warn/Wstrict-aliasing-bogus-escape.C: Likewise.
* g++.dg/warn/Wstringop-overflow-6.C: Likewise.
* g++.dg/warn/Wstringop-overflow-8.C: Likewise.
* g++.dg/warn/Wstringop-overread-1.C: Likewise.
* g++.dg/warn/Wuninitialized-33.C: Likewise.
* g++.dg/warn/Wuninitialized-pr111123-1.C: Likewise.
* g++.dg/warn/format1.C: Likewise.
* g++.dg/warn/huge-val1.C: Likewise.
* g++.dg/warn/string1.C: Likewise.
* g++.dg/warn/uninit-pr105562.C: Likewise.
* g++.old-deja/g++.benjamin/15071.C: Likewise.
* g++.old-deja/g++.brendan/copy9.C: Likewise.
* g++.old-deja/g++.brendan/crash15.C: Likewise.
* g++.old-deja/g++.brendan/crash20.C: Likewise.
* g++.old-deja/g++.brendan/crash30.C: Likewise.
* g++.old-deja/g++.brendan/crash38.C: Likewise.
* g++.old-deja/g++.brendan/crash39.C: Likewise.
* g++.old-deja/g++.brendan/crash49.C: Likewise.
* g++.old-deja/g++.brendan/crash52.C: Likewise.
* g++.old-deja/g++.brendan/crash62.C: Likewise.
* g++.old-deja/g++.brendan/cvt1.C: Likewise.
* g++.old-deja/g++.brendan/err-msg3.C: Likewise.
* g++.old-deja/g++.brendan/nest21.C: Likewise.
* g++.old-deja/g++.brendan/ptolemy2.C: Likewise.
* g++.old-deja/g++.jason/2371.C: Likewise.
* g++.old-deja/g++.jason/template24.C: Likewise.
* g++.old-deja/g++.jason/template31.C: Likewise.
* g++.old-deja/g++.jason/typeid1.C: Likewise.
* g++.old-deja/g++.law/arg1.C: Likewise.
* g++.old-deja/g++.law/arg8.C: Likewise.
* g++.old-deja/g++.law/arm12.C: Likewise.
* g++.old-deja/g++.law/arm9.C: Likewise.
* g++.old-deja/g++.law/bad-error7.C: Likewise.
* g++.old-deja/g++.law/code-gen5.C: Likewise.
* g++.old-deja/g++.law/ctors10.C: Likewise.
* g++.old-deja/g++.law/ctors12.C: Likewise.
* g++.old-deja/g++.law/ctors13.C: Likewise.
* g++.old-deja/g++.law/ctors17.C: Likewise.
* g++.old-deja/g++.law/ctors6.C: Likewise.
* g++.old-deja/g++.law/cvt16.C: Likewise.
* g++.old-deja/g++.law/cvt2.C: Likewise.
* g++.old-deja/g++.law/cvt7.C: Likewise.
* g++.old-deja/g++.law/except5.C: Likewise.
* g++.old-deja/g++.law/missed-error2.C: Likewise.
* g++.old-deja/g++.law/nest3.C: Likewise.
* g++.old-deja/g++.law/operators32.C: Likewise.
* g++.old-deja/g++.law/operators4.C: Likewise.
* g++.old-deja/g++.law/vbase1.C: Likewise.
* g++.old-deja/g++.law/virtual3.C: Likewise.
* g++.old-deja/g++.law/visibility1.C: Likewise.
* g++.old-deja/g++.law/visibility10.C: Likewise.
* g++.old-deja/g++.law/visibility13.C: Likewise.
* g++.old-deja/g++.law/visibility17.C: Likewise.
* g++.old-deja/g++.law/visibility2.C: Likewise.
* g++.old-deja/g++.law/visibility22.C: Likewise.
* g++.old-deja/g++.law/visibility25.C: Likewise.
* g++.old-deja/g++.law/visibility7.C: Likewise.
* g++.old-deja/g++.law/weak.C: Likewise.
* g++.old-deja/g++.martin/new1.C: Likewise.
* g++.old-deja/g++.mike/dyncast7.C: Likewise.
* g++.old-deja/g++.mike/eh13.C: Likewise.
* g++.old-deja/g++.mike/eh2.C: Likewise.
* g++.old-deja/g++.mike/net34.C: Likewise.
* g++.old-deja/g++.mike/net46.C: Likewise.
* g++.old-deja/g++.mike/p658.C: Likewise.
* g++.old-deja/g++.mike/rtti1.C: Likewise.
* g++.old-deja/g++.ns/using4.C: Likewise.
* g++.old-deja/g++.ns/using6.C: Likewise.
* g++.old-deja/g++.other/defarg6.C: Likewise.
* g++.old-deja/g++.other/headers1.C: Likewise.
* g++.old-deja/g++.other/init9.C: Likewise.
* g++.old-deja/g++.other/inline14.C: Likewise.
* g++.old-deja/g++.other/inline2.C: Likewise.
* g++.old-deja/g++.other/inline7.C: Likewise.
* g++.old-deja/g++.other/inline8.C: Likewise.
* g++.old-deja/g++.other/optimize2.C: Likewise.
* g++.old-deja/g++.other/sibcall1.C: Likewise.
* g++.old-deja/g++.other/unchanging1.C: Likewise.
* g++.old-deja/g++.pt/crash68.C: Likewise.
* g++.old-deja/g++.pt/memtemp100.C: Likewise.
* g++.old-deja/g++.robertl/eb109.C: Likewise.
* g++.old-deja/g++.robertl/eb113.C: Likewise.
* g++.old-deja/g++.robertl/eb115.C: Likewise.
* g++.old-deja/g++.robertl/eb124.C: Likewise.
* g++.old-deja/g++.robertl/eb127.C: Likewise.
* g++.old-deja/g++.robertl/eb129.C: Likewise.
* g++.old-deja/g++.robertl/eb129a.C: Likewise.
* g++.old-deja/g++.robertl/eb130.C: Likewise.
* g++.old-deja/g++.robertl/eb132.C: Likewise.
* g++.old-deja/g++.robertl/eb15.C: Likewise.
* g++.old-deja/g++.robertl/eb21.C: Likewise.
* g++.old-deja/g++.robertl/eb24.C: Likewise.
* g++.old-deja/g++.robertl/eb27.C: Likewise.
* g++.old-deja/g++.robertl/eb28.C: Likewise.
* g++.old-deja/g++.robertl/eb29.C: Likewise.
* g++.old-deja/g++.robertl/eb3.C: Likewise.
* g++.old-deja/g++.robertl/eb30.C: Likewise.
* g++.old-deja/g++.robertl/eb31.C: Likewise.
* g++.old-deja/g++.robertl/eb33.C: Likewise.
* g++.old-deja/g++.robertl/eb36.C: Likewise.
* g++.old-deja/g++.robertl/eb39.C: Likewise.
* g++.old-deja/g++.robertl/eb4.C: Likewise.
* g++.old-deja/g++.robertl/eb41.C: Likewise.
* g++.old-deja/g++.robertl/eb43.C: Likewise.
* g++.old-deja/g++.robertl/eb44.C: Likewise.
* g++.old-deja/g++.robertl/eb46.C: Likewise.
* g++.old-deja/g++.robertl/eb54.C: Likewise.
* g++.old-deja/g++.robertl/eb55.C: Likewise.
* g++.old-deja/g++.robertl/eb59.C: Likewise.
* g++.old-deja/g++.robertl/eb60.C: Likewise.
* g++.old-deja/g++.robertl/eb62.C: Likewise.
* g++.old-deja/g++.robertl/eb66.C: Likewise.
* g++.old-deja/g++.robertl/eb7.C: Likewise.
* g++.old-deja/g++.robertl/eb73.C: Likewise.
* g++.old-deja/g++.robertl/eb77.C: Likewise.
* g++.old-deja/g++.robertl/eb79.C: Likewise.
* g++.old-deja/g++.warn/iomanip.C: Likewise.
* g++.target/i386/pr105638.C: Likewise.
* g++.target/i386/pr110170.C: Likewise.
* g++.target/i386/pr80566-1.C: Likewise.
* g++.target/i386/pr80566-2.C: Likewise.
* c-c++-common/analyzer/allocation-size-1.c: Skip if
!hostedlib because of unavailable declarations.
* c-c++-common/analyzer/allocation-size-2.c: Likewise.
* c-c++-common/analyzer/allocation-size-3.c: Likewise.
* c-c++-common/analyzer/allocation-size-4.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-0.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-1.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-2.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-3.c: Likewise.
* c-c++-common/analyzer/call-summaries-1.c: Likewise.
* c-c++-common/analyzer/call-summaries-malloc.c: Likewise.
* c-c++-common/analyzer/callbacks-1.c: Likewise.
* c-c++-common/analyzer/callbacks-2.c: Likewise.
* c-c++-common/analyzer/capacity-1.c: Likewise.
* c-c++-common/analyzer/capacity-2.c: Likewise.
* c-c++-common/analyzer/capacity-3.c: Likewise.
* c-c++-common/analyzer/compound-assignment-1.c: Likewise.
* c-c++-common/analyzer/data-model-14.c: Likewise.
* c-c++-common/analyzer/data-model-20.c: Likewise.
* c-c++-common/analyzer/data-model-5d.c: Likewise.
* c-c++-common/analyzer/disabling.c: Likewise.
* c-c++-common/analyzer/dump-state.c: Likewise.
* c-c++-common/analyzer/edges-2.c: Likewise.
* c-c++-common/analyzer/first-field-2.c: Likewise.
* c-c++-common/analyzer/flex-with-call-summaries.c: Likewise.
* c-c++-common/analyzer/flex-without-call-summaries.c:
Likewise.
* c-c++-common/analyzer/flexible-array-member-1.c: Likewise.
* c-c++-common/analyzer/function-ptr-2.c: Likewise.
* c-c++-common/analyzer/function-ptr-3.c: Likewise.
* c-c++-common/analyzer/function-ptr-4.c: Likewise.
* c-c++-common/analyzer/gzio.c: Likewise.
* c-c++-common/analyzer/imprecise-floating-point-1.c:
Likewise.
* c-c++-common/analyzer/leak-2.c: Likewise.
* c-c++-common/analyzer/leak-3.c: Likewise.
* c-c++-common/analyzer/leak-4.c: Likewise.
* c-c++-common/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c:
Likewise.
* c-c++-common/analyzer/loop-3.c: Likewise.
* c-c++-common/analyzer/malloc-3.c: Likewise.
* c-c++-common/analyzer/malloc-5.c: Likewise.
* c-c++-common/analyzer/malloc-CWE-401-example.c: Likewise.
* c-c++-common/analyzer/malloc-CWE-415-examples.c: Likewise.
* c-c++-common/analyzer/malloc-CWE-416-examples.c: Likewise.
* c-c++-common/analyzer/malloc-CWE-590-examples.c: Likewise.
* c-c++-common/analyzer/malloc-callbacks.c: Likewise.
* c-c++-common/analyzer/malloc-dce.c: Likewise.
* c-c++-common/analyzer/malloc-dedupe-1.c: Likewise.
* c-c++-common/analyzer/malloc-in-loop.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-1.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-10.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-11.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-12.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-13a.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-2.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-3.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-4.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-5.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-6.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-7.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-9.c: Likewise.
* c-c++-common/analyzer/malloc-macro-inline-events.c:
Likewise.
* c-c++-common/analyzer/malloc-macro-separate-events.c:
Likewise.
* c-c++-common/analyzer/malloc-many-paths-3.c: Likewise.
* c-c++-common/analyzer/malloc-meaning-1.c: Likewise.
* c-c++-common/analyzer/malloc-paths-1.c: Likewise.
* c-c++-common/analyzer/malloc-paths-2.c: Likewise.
* c-c++-common/analyzer/malloc-paths-3.c: Likewise.
* c-c++-common/analyzer/malloc-paths-4.c: Likewise.
* c-c++-common/analyzer/malloc-paths-5.c: Likewise.
* c-c++-common/analyzer/malloc-paths-6.c: Likewise.
* c-c++-common/analyzer/malloc-paths-7.c: Likewise.
* c-c++-common/analyzer/malloc-paths-8.c: Likewise.
* c-c++-common/analyzer/malloc-paths-9-noexcept.c: Likewise.
* c-c++-common/analyzer/malloc-sarif-1.c: Likewise.
* c-c++-common/analyzer/malloc-vs-local-1a.c: Likewise.
* c-c++-common/analyzer/malloc-vs-local-1b.c: Likewise.
* c-c++-common/analyzer/malloc-vs-local-2.c: Likewise.
* c-c++-common/analyzer/malloc-vs-local-3.c: Likewise.
* c-c++-common/analyzer/out-of-bounds-1.c: Likewise.
* c-c++-common/analyzer/out-of-bounds-2.c: Likewise.
* c-c++-common/analyzer/out-of-bounds-diagram-3.c: Likewise.
* c-c++-common/analyzer/out-of-bounds-diagram-8.c: Likewise.
* c-c++-common/analyzer/paths-3.c: Likewise.
* c-c++-common/analyzer/paths-6.c: Likewise.
* c-c++-common/analyzer/paths-7.c: Likewise.
* c-c++-common/analyzer/pr103526.c: Likewise.
* c-c++-common/analyzer/pr106539.c: Likewise.
* c-c++-common/analyzer/pr94399.c: Likewise.
* c-c++-common/analyzer/pr94851-1.c: Likewise.
* c-c++-common/analyzer/pr94851-2.c: Likewise.
* c-c++-common/analyzer/pr94851-4.c: Likewise.
* c-c++-common/analyzer/pr97608.c: Likewise.
* c-c++-common/analyzer/pr98918.c: Likewise.
* c-c++-common/analyzer/pr99716-2.c: Likewise.
* c-c++-common/analyzer/pr99716-3.c: Likewise.
* c-c++-common/analyzer/pragma-1.c: Likewise.
* c-c++-common/analyzer/pragma-2.c: Likewise.
* c-c++-common/analyzer/sarif-path-role.c: Likewise.
* c-c++-common/analyzer/scope-1.c: Likewise.
* c-c++-common/analyzer/strndup-1.c: Likewise.
* c-c++-common/analyzer/taint-alloc-3.c: Likewise.
* c-c++-common/analyzer/taint-realloc.c: Likewise.
* c-c++-common/analyzer/use-after-free-3.c: Likewise.
* c-c++-common/analyzer/zlib-4.c: Likewise.
* c-c++-common/goacc/kernels-counter-vars-function-scope.c:
Likewise.
* c-c++-common/goacc/kernels-loop-2.c: Likewise.
* c-c++-common/goacc/kernels-loop-3.c: Likewise.
* c-c++-common/goacc/kernels-loop-data-2.c: Likewise.
* c-c++-common/goacc/kernels-loop-data-enter-exit-2.c:
Likewise.
* c-c++-common/goacc/kernels-loop-data-enter-exit.c:
Likewise.
* c-c++-common/goacc/kernels-loop-data-update.c: Likewise.
* c-c++-common/goacc/kernels-loop-data.c: Likewise.
* c-c++-common/goacc/kernels-loop-g.c: Likewise.
* c-c++-common/goacc/kernels-loop-mod-not-zero.c: Likewise.
* c-c++-common/goacc/kernels-loop-n.c: Likewise.
* c-c++-common/goacc/kernels-loop.c: Likewise.
* c-c++-common/goacc/kernels-one-counter-var.c: Likewise.
* c-c++-common/goacc/kernels-parallel-loop-data-enter-exit.c:
Likewise.
* c-c++-common/gomp/pr103642.c: Likewise.
* c-c++-common/gomp/target-implicit-map-2.c: Likewise.
* c-c++-common/simulate-thread/bitfields-4.c: Likewise.
* c-c++-common/tm/malloc.c: Likewise.
* g++.dg/abi/mangle36.C: Likewise.
* g++.dg/abi/mangle40.C: Likewise.
* g++.dg/abi/mangle41.C: Likewise.
* g++.dg/analyzer/cstdlib.C: Likewise.
* g++.dg/analyzer/fanalyzer-show-events-in-system-headers-default.C:
Likewise.
* g++.dg/analyzer/fanalyzer-show-events-in-system-headers-no.C:
Likewise.
* g++.dg/analyzer/fanalyzer-show-events-in-system-headers.C:
Likewise.
* g++.dg/analyzer/malloc.C: Likewise.
* g++.dg/analyzer/new-vs-malloc.C: Likewise.
* g++.dg/analyzer/placement-new-size.C: Likewise.
* g++.dg/analyzer/vfunc-3.C: Likewise.
* g++.dg/analyzer/vfunc-5.C: Likewise.
* g++.dg/coroutines/coro-bad-gro-00-class-gro-scalar-return.C:
Likewise.
* g++.dg/coroutines/coro-bad-gro-01-void-gro-non-class-coro.C:
Likewise.
* g++.dg/coroutines/pr101765.C: Likewise.
* g++.dg/coroutines/pr95477.C: Likewise.
* g++.dg/coroutines/pr95599.C: Likewise.
* g++.dg/coroutines/pr95711.C: Likewise.
* g++.dg/coroutines/torture/alloc-00-gro-on-alloc-fail.C:
Likewise.
* g++.dg/coroutines/torture/alloc-01-overload-newdel.C:
Likewise.
* g++.dg/coroutines/torture/alloc-02-fail-new-grooaf-check.C:
Likewise.
* g++.dg/coroutines/torture/alloc-03-overload-new-1.C:
Likewise.
* g++.dg/coroutines/torture/alloc-04-overload-del-use-two-args.C:
Likewise.
* g++.dg/coroutines/torture/call-00-co-aw-arg.C: Likewise.
* g++.dg/coroutines/torture/call-01-multiple-co-aw.C:
Likewise.
* g++.dg/coroutines/torture/call-02-temp-co-aw.C: Likewise.
* g++.dg/coroutines/torture/call-03-temp-ref-co-aw.C:
Likewise.
* g++.dg/coroutines/torture/class-00-co-ret.C: Likewise.
* g++.dg/coroutines/torture/class-01-co-ret-parm.C: Likewise.
* g++.dg/coroutines/torture/class-02-templ-parm.C: Likewise.
* g++.dg/coroutines/torture/class-03-operator-templ-parm.C:
Likewise.
* g++.dg/coroutines/torture/class-04-lambda-1.C: Likewise.
* g++.dg/coroutines/torture/class-05-lambda-capture-copy-local.C:
Likewise.
* g++.dg/coroutines/torture/class-06-lambda-capture-ref.C:
Likewise.
* g++.dg/coroutines/torture/class-07-data-member.C: Likewise.
* g++.dg/coroutines/torture/co-await-00-trivial.C: Likewise.
* g++.dg/coroutines/torture/co-await-01-with-value.C:
Likewise.
* g++.dg/coroutines/torture/co-await-02-xform.C: Likewise.
* g++.dg/coroutines/torture/co-await-03-rhs-op.C: Likewise.
* g++.dg/coroutines/torture/co-await-04-control-flow.C:
Likewise.
* g++.dg/coroutines/torture/co-await-05-loop.C: Likewise.
* g++.dg/coroutines/torture/co-await-06-ovl.C: Likewise.
* g++.dg/coroutines/torture/co-await-07-tmpl.C: Likewise.
* g++.dg/coroutines/torture/co-await-08-cascade.C: Likewise.
* g++.dg/coroutines/torture/co-await-09-pair.C: Likewise.
* g++.dg/coroutines/torture/co-await-10-template-fn-arg.C:
Likewise.
* g++.dg/coroutines/torture/co-await-11-forwarding.C:
Likewise.
* g++.dg/coroutines/torture/co-await-12-operator-2.C:
Likewise.
* g++.dg/coroutines/torture/co-await-13-return-ref.C:
Likewise.
* g++.dg/coroutines/torture/co-await-14-return-ref-to-auto.C:
Likewise.
* g++.dg/coroutines/torture/co-await-15-return-non-triv.C:
Likewise.
* g++.dg/coroutines/torture/co-await-17-capture-comp-ref.C:
Likewise.
* g++.dg/coroutines/torture/co-await-18-if-cond.C: Likewise.
* g++.dg/coroutines/torture/co-await-19-while-cond.C:
Likewise.
* g++.dg/coroutines/torture/co-await-20-do-while-cond.C:
Likewise.
* g++.dg/coroutines/torture/co-await-21-switch-value.C:
Likewise.
* g++.dg/coroutines/torture/co-await-22-truth-and-of-if.C:
Likewise.
* g++.dg/coroutines/torture/co-await-24-for-init.C: Likewise.
* g++.dg/coroutines/torture/co-await-25-for-condition.C:
Likewise.
* g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-05-return-value.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-07-void-cast-expr.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-10-expression-evaluates-once.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-11-co-ret-co-await.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-12-co-ret-fun-co-await.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-13-template-2.C: Likewise.
* g++.dg/coroutines/torture/co-ret-14-template-3.C: Likewise.
* g++.dg/coroutines/torture/co-ret-16-simple-control-flow.C:
Likewise.
* g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C:
Likewise.
* g++.dg/coroutines/torture/co-yield-00-triv.C: Likewise.
* g++.dg/coroutines/torture/co-yield-01-multi.C: Likewise.
* g++.dg/coroutines/torture/co-yield-02-loop.C: Likewise.
* g++.dg/coroutines/torture/co-yield-03-tmpl.C: Likewise.
* g++.dg/coroutines/torture/co-yield-03-tmpl-nondependent.C:
Likewise.
* g++.dg/coroutines/torture/co-yield-05-co-aw.C: Likewise.
* g++.dg/coroutines/torture/co-yield-06-fun-parm.C: Likewise.
* g++.dg/coroutines/torture/co-yield-07-template-fn-param.C:
Likewise.
* g++.dg/coroutines/torture/co-yield-08-more-refs.C:
Likewise.
* g++.dg/coroutines/torture/co-yield-09-more-templ-refs.C:
Likewise.
* g++.dg/coroutines/torture/exceptions-test-0.C: Likewise.
* g++.dg/coroutines/torture/exceptions-test-01-n4849-a.C:
Likewise.
* g++.dg/coroutines/torture/func-params-00.C: Likewise.
* g++.dg/coroutines/torture/func-params-01.C: Likewise.
* g++.dg/coroutines/torture/func-params-02.C: Likewise.
* g++.dg/coroutines/torture/func-params-03.C: Likewise.
* g++.dg/coroutines/torture/func-params-04.C: Likewise.
* g++.dg/coroutines/torture/func-params-05.C: Likewise.
* g++.dg/coroutines/torture/func-params-06.C: Likewise.
* g++.dg/coroutines/torture/func-params-07.C: Likewise.
* g++.dg/coroutines/torture/lambda-00-co-ret.C: Likewise.
* g++.dg/coroutines/torture/lambda-01-co-ret-parm.C:
Likewise.
* g++.dg/coroutines/torture/lambda-02-co-yield-values.C:
Likewise.
* g++.dg/coroutines/torture/lambda-03-auto-parm-1.C:
Likewise.
* g++.dg/coroutines/torture/lambda-04-templ-parm.C: Likewise.
* g++.dg/coroutines/torture/lambda-05-capture-copy-local.C:
Likewise.
* g++.dg/coroutines/torture/lambda-06-multi-capture.C:
Likewise.
* g++.dg/coroutines/torture/lambda-07-multi-yield.C:
Likewise.
* g++.dg/coroutines/torture/lambda-08-co-ret-parm-ref.C:
Likewise.
* g++.dg/coroutines/torture/lambda-09-init-captures.C:
Likewise.
* g++.dg/coroutines/torture/lambda-10-mutable.C: Likewise.
* g++.dg/coroutines/torture/local-var-00-const.C: Likewise.
* g++.dg/coroutines/torture/local-var-01-single.C: Likewise.
* g++.dg/coroutines/torture/local-var-02-conditional.C:
Likewise.
* g++.dg/coroutines/torture/local-var-03-with-awaits.C:
Likewise.
* g++.dg/coroutines/torture/local-var-04-hiding-nested-scopes.C:
Likewise.
* g++.dg/coroutines/torture/local-var-06-structured-binding.C:
Likewise.
* g++.dg/coroutines/torture/mid-suspend-destruction-0.C:
Likewise.
* g++.dg/coroutines/torture/pr95003.C: Likewise.
* g++.dg/coroutines/torture/pr95519-00-return_void.C:
Likewise.
* g++.dg/coroutines/torture/pr95519-01-initial-suspend.C:
Likewise.
* g++.dg/coroutines/torture/pr95519-02-final_suspend.C:
Likewise.
* g++.dg/coroutines/torture/pr95519-03-return-value.C:
Likewise.
* g++.dg/coroutines/torture/pr95519-04-yield-value.C:
Likewise.
* g++.dg/coroutines/torture/pr95519-05-gro.C: Likewise.
* g++.dg/coroutines/torture/pr95519-06-grooaf.C: Likewise.
* g++.dg/coroutines/torture/pr95519-07-unhandled-exception.C:
Likewise.
* g++.dg/cpp0x/lambda/lambda-std-function.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-this8.C: Likewise.
* g++.dg/cpp0x/pr70887.C: Likewise.
* g++.dg/cpp1y/lambda-generic-variadic2.C: Likewise.
* g++.dg/cpp23/subscript5.C: Likewise.
* g++.dg/cpp23/subscript6.C: Likewise.
* g++.dg/cpp26/constexpr-new2.C: Likewise.
* g++.dg/cpp2a/destroying-delete5.C: Likewise.
* g++.dg/eh/filter2.C: Likewise.
* g++.dg/eh/uncaught1.C: Likewise.
* g++.dg/eh/uncaught2.C: Likewise.
* g++.dg/expr/anew1.C: Likewise.
* g++.dg/expr/anew2.C: Likewise.
* g++.dg/expr/anew3.C: Likewise.
* g++.dg/expr/anew4.C: Likewise.
* g++.dg/ext/cleanup-10.C: Likewise.
* g++.dg/ext/cleanup-11.C: Likewise.
* g++.dg/ext/cleanup-5.C: Likewise.
* g++.dg/ext/cleanup-8.C: Likewise.
* g++.dg/ext/cleanup-9.C: Likewise.
* g++.dg/ext/is_invocable2.C: Likewise.
* g++.dg/goacc/pr107028-2.C: Likewise.
* g++.dg/gomp/target-lambda-2.C: Likewise.
* g++.dg/init/new11.C: Likewise.
* g++.dg/init/value3.C: Likewise.
* g++.dg/lto/pr66180_0.C: Likewise.
* g++.dg/opt/eh4.C: Likewise.
* g++.dg/opt/pr103989.C: Likewise.
* g++.dg/opt/pr80385.C: Likewise.
* g++.dg/opt/reload3.C: Likewise.
* g++.dg/other/i386-1.C: Likewise.
* g++.dg/other/i386-11.C: Likewise.
* g++.dg/other/i386-2.C: Likewise.
* g++.dg/other/i386-3.C: Likewise.
* g++.dg/other/i386-4.C: Likewise.
* g++.dg/other/i386-7.C: Likewise.
* g++.dg/other/i386-8.C: Likewise.
* g++.dg/other/mmintrin.C: Likewise.
* g++.dg/other/pr34435.C: Likewise.
* g++.dg/other/pr40446.C: Likewise.
* g++.dg/other/pr49133.C: Likewise.
* g++.dg/other/ucnid-1-utf8.C: Likewise.
* g++.dg/other/ucnid-1.C: Likewise.
* g++.dg/pr80481.C: Likewise.
* g++.dg/torture/pr10148.C: Likewise.
* g++.dg/torture/pr91334.C: Likewise.
* g++.dg/torture/pr91606.C: Likewise.
* g++.dg/tree-ssa/pr102216-2.C: Likewise.
* g++.dg/vect/slp-pr98855.cc: Likewise.
* g++.dg/warn/Wsystem-headers1a.C: Likewise.
* g++.dg/warn/noreturn-1.C: Likewise.
* g++.old-deja/g++.abi/arraynew.C: Likewise.
* g++.old-deja/g++.abi/cxa_vec.C: Likewise.
* g++.old-deja/g++.brendan/new3.C: Likewise.
* g++.old-deja/g++.eh/new1.C: Likewise.
* g++.old-deja/g++.eh/new2.C: Likewise.
* g++.old-deja/g++.jason/template44.C: Likewise.
* g++.old-deja/g++.law/arm13.C: Likewise.
* g++.old-deja/g++.law/scope2.C: Likewise.
* g++.old-deja/g++.mike/eh47.C: Likewise.
* g++.old-deja/g++.mike/ns15.C: Likewise.
* g++.old-deja/g++.mike/p710.C: Likewise.
* g++.old-deja/g++.mike/p9706.C: Likewise.
* g++.old-deja/g++.oliva/new1.C: Likewise.
* g++.old-deja/g++.other/delete8.C: Likewise.
* g++.target/i386/avx-pr54700-1.C: Likewise.
* g++.target/i386/avx-pr54700-2.C: Likewise.
* g++.target/i386/avx2-pr54700-1.C: Likewise.
* g++.target/i386/avx2-pr54700-2.C: Likewise.
* g++.target/i386/avx512bw-pr96246-2.C: Likewise.
* g++.target/i386/avx512vl-pr54700-1a.C: Likewise.
* g++.target/i386/avx512vl-pr54700-1b.C: Likewise.
* g++.target/i386/avx512vl-pr54700-2a.C: Likewise.
* g++.target/i386/avx512vl-pr54700-2b.C: Likewise.
* g++.target/i386/avx512vl-pr96246-2.C: Likewise.
* g++.target/i386/mvc4.C: Likewise.
* g++.target/i386/pr100885.C: Likewise.
* g++.target/i386/pr102166.C: Likewise.
* g++.target/i386/pr103750-fwprop-1.C: Likewise.
* g++.target/i386/pr105593.C: Likewise.
* g++.target/i386/pr112443.C: Likewise.
* g++.target/i386/pr113560.C: Likewise.
* g++.target/i386/pr88152.C: Likewise.
* g++.target/i386/pr88998.C: Likewise.
* g++.target/i386/pr94046-1.C: Likewise.
* g++.target/i386/pr94046-2.C: Likewise.
* g++.target/i386/sse4_1-pr54700-1.C: Likewise.
* g++.target/i386/sse4_1-pr54700-2.C: Likewise.
* g++.dg/tree-ssa/pr20458.C: Skip if !hostedlib because of
unavailable library definitions.
|
|
frame size on 16 bit targets.
Note: GCC has a limitation that a stack frame cannot exceed half the address space.
For two tests the decision to modify or skip them seems not so clear-cut;
I choose to modify gcc.dg/pr47893.c to use types that fit the numbers, as
that seemed to have little impact on the test, and skip gcc.dg/pr115646.c
for 16 bit, as layout of structs with bitfields members can have quite
subtle rules.
gcc/testsuite/
* gcc.dg/pr107523.c: Make sure variables can fit numbers.
* gcc.dg/pr47893.c: Add dg-require-effective-target size20plus clause.
* c-c++-common/torture/builtin-clear-padding-2.c:
dg-require-effective-target size20plus.
* gcc.dg/pr115646.c: dg-require-effective-target int32plus.
* c-c++-common/analyzer/coreutils-sum-pr108666.c:
For c++, expect a warning about exceeding maximum object size
if not size20plus.
* gcc.dg/torture/inline-mem-cpy-1.c:
Like the included file, dg-require-effective-target ptr32plus.
* gcc.dg/torture/inline-mem-cmp-1.c: Likewise.
|
|
At -O0, glibc's:
__extern_always_inline void
error (int __status, int __errnum, const char *__format, ...)
{
if (__builtin_constant_p (__status) && __status != 0)
__error_noreturn (__status, __errnum, __format, __builtin_va_arg_pack ());
else
__error_alias (__status, __errnum, __format, __builtin_va_arg_pack ());
}
becomes just:
__extern_always_inline void
error (int __status, int __errnum, const char *__format, ...)
{
if (0)
__error_noreturn (__status, __errnum, __format, __builtin_va_arg_pack ());
else
__error_alias (__status, __errnum, __format, __builtin_va_arg_pack ());
}
and thus calls to "error" are calls to "__error_alias" by the
time -fanalyzer "sees" them.
Handle them with more special-casing in kf.cc.
gcc/analyzer/ChangeLog:
PR analyzer/115724
* kf.cc (register_known_functions): Add __error_alias and
__error_at_line_alias.
gcc/testsuite/ChangeLog:
PR analyzer/115724
* c-c++-common/analyzer/error-pr115724.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
analyzer/105892)
Add a new warning to complain about pointer subtraction involving
different chunks of memory.
For example, given:
#include <stddef.h>
int arr[42];
int sentinel;
ptrdiff_t
test_invalid_calc_of_array_size (void)
{
return &sentinel - arr;
}
this emits:
demo.c: In function ‘test_invalid_calc_of_array_size’:
demo.c:9:20: warning: undefined behavior when subtracting pointers [CWE-469] [-Wanalyzer-undefined-behavior-ptrdiff]
9 | return &sentinel - arr;
| ^
events 1-2
│
│ 3 | int arr[42];
│ | ~~~
│ | |
│ | (2) underlying object for right-hand side of subtraction created here
│ 4 | int sentinel;
│ | ^~~~~~~~
│ | |
│ | (1) underlying object for left-hand side of subtraction created here
│
└──> ‘test_invalid_calc_of_array_size’: event 3
│
│ 9 | return &sentinel - arr;
│ | ^
│ | |
│ | (3) ⚠️ subtraction of pointers has undefined behavior if they do not point into the same array object
│
gcc/analyzer/ChangeLog:
PR analyzer/105892
* analyzer.opt (Wanalyzer-undefined-behavior-ptrdiff): New option.
* analyzer.opt.urls: Regenerate.
* region-model.cc (class undefined_ptrdiff_diagnostic): New.
(check_for_invalid_ptrdiff): New.
(region_model::get_gassign_result): Call it for POINTER_DIFF_EXPR.
gcc/ChangeLog:
* doc/invoke.texi: Add -Wanalyzer-undefined-behavior-ptrdiff.
gcc/testsuite/ChangeLog:
PR analyzer/105892
* c-c++-common/analyzer/out-of-bounds-pr110387.c: Add
expected warnings about pointer subtraction.
* c-c++-common/analyzer/ptr-subtraction-1.c: New test.
* c-c++-common/analyzer/ptr-subtraction-CWE-469-example.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
Add the property "roles" (SARIF v2.1 3.24.6) to artifacts.
Populate it with:
* "analysisTarget" for the top-level input file
* "resultFile" for any other file a diagnostic is reported in
* "tracedFile" for any file a diagnostic event is reported in
gcc/ChangeLog:
* diagnostic-format-sarif.cc: Include "ordered-hash-map.h" and
"sbitmap.h".
(enum class diagnostic_artifact_role): New.
(class sarif_artifact): New.
(sarif_builder::maybe_make_artifact_content_object): Make public.
(sarif_builder::m_filenames): Replace with...
(sarif_builder::m_filename_to_artifact_map): ...this.
(sarif_artifact::add_role): New.
(sarif_artifact::populate_contents): New.
(get_artifact_role_string): New.
(sarif_artifact::populate_roles): New.
(sarif_result::on_nested_diagnostic): Pass role to
make_location_object.
(sarif_ice_notification::sarif_ice_notification): Likewise.
(sarif_builder::sarif_builder): Add "main_input_filename_" param.
Mark it as the artifact that the tool was instructed to scan.
(sarif_builder::make_result_object): Pass role to
make_locations_arr.
(sarif_builder::make_locations_arr): Add "role" param and pass it
to make_location_object.
(sarif_builder::make_location_object): Add "role" param and pass
it to maybe_make_physical_location_object.
(sarif_builder::maybe_make_physical_location_object): Add "role"
param and pass it to call to get_or_create_artifact, rather than
adding to now-removed "m_filenames". Flag the artifact for its
contents to be embedded.
(sarif_builder::make_thread_flow_location_object): Pass role to
make_location_object.
(sarif_builder::make_run_object): Update for change from
m_filename to m_filename_to_artifact_map. Call populate_contents
and populate_roles on each artifact_obj.
(sarif_builder::make_artifact_object): Convert to...
(sarif_builder::get_or_create_artifact): ...this, moving addition
of contents to make_run_object, and conditionalizing setting of
sourceLanguage on "role".
(sarif_output_format::sarif_output_format): Add
"main_input_filename_" param and pass to m_builder's ctor.
(sarif_stream_output_format::sarif_stream_output_format):
Likewise.
(sarif_file_output_format::sarif_file_output_format): Likewise.
(diagnostic_output_format_init_sarif_stderr): Add
"main_input_filename_" param and pass to ctor.
(diagnostic_output_format_init_sarif_file): Likewise.
(diagnostic_output_format_init_sarif_stream): Likewise.
* diagnostic.cc (diagnostic_output_format_init): Add
"main_input_filename_" param and pass to the
diagnostic_output_format_init_sarif_* calls.
* diagnostic.h (diagnostic_output_format_init): Add
main_input_filename_" param to decl.
(diagnostic_output_format_init_sarif_stderr): Likewise.
(diagnostic_output_format_init_sarif_file): Likewise.
(diagnostic_output_format_init_sarif_stream): Likewise.
* gcc.cc (driver_handle_option): Pass main input filename to
diagnostic_output_format_init.
* opts.cc (common_handle_option): Likewise.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/sarif-path-role.c: New test.
* c-c++-common/analyzer/sarif-path-role.h: New header for above
test.
* c-c++-common/diagnostic-format-sarif-file-1.c: Verify the
artifact's "role" property.
* c-c++-common/diagnostic-format-sarif-file-header-role.c: New
test.
* c-c++-common/diagnostic-format-sarif-file-header-role.h: New
header for above test.
* c-c++-common/diagnostic-format-sarif-file-no-results.c: New
test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/analyzer/ChangeLog:
PR analyzer/106203
* checker-event.h: Include "analyzer/event-loc-info.h".
(struct event_loc_info): Move to its own header file.
* diagnostic-manager.cc
(diagnostic_manager::emit_saved_diagnostic): Move creation of
event_loc_info here from add_final_event, and if we have a
stmt_finder, call its update_event_loc_info method.
* engine.cc (leak_stmt_finder::update_event_loc_info): New.
(exploded_node::detect_leaks): Likewise.
(exploded_node::detect_leaks): Pass nullptr as call_stmt arg to
region_model::pop_frame.
* event-loc-info.h: New file, with content taken from
checker-event.h.
* exploded-graph.h (stmt_finder::update_event_loc_info): New pure
virtual function.
* infinite-loop.cc (infinite_loop_diagnostic::add_final_event):
Update for change to vfunc signature.
* infinite-recursion.cc
(infinite_recursion_diagnostic::add_final_event): Likewise.
* pending-diagnostic.cc (pending_diagnostic::add_final_event):
Pass in the event_loc_info from the caller, rather than generating
it from a gimple stmt and enode.
* pending-diagnostic.h (pending_diagnostic::add_final_event):
Likewise.
* region-model.cc (region_model::on_longjmp): Pass nullptr as
call_stmt arg to region_model::pop_frame.
(region_model::update_for_return_gcall): Likewise, but pass
call_stmt.
(class caller_context): New.
(region_model::pop_frame): Add "call_stmt" argument. Use it
and the frame_region with a caller_context when setting
result_dst_reg's value so that any diagnostic is reported at the
call stmt in the caller.
(selftest::test_stack_frames): Pass nullptr as call_stmt arg to
region_model::pop_frame.
(selftest::test_alloca): Likewise.
* region-model.h (region_model::pop_frame): Add "call_stmt"
argument.
gcc/testsuite/ChangeLog:
PR analyzer/106203
* c-c++-common/analyzer/allocation-size-1.c (test_9): Remove
xfail.
* c-c++-common/analyzer/allocation-size-2.c (test_8): Likewise.
* gcc.dg/analyzer/allocation-size-multiline-4.c: New test.
* gcc.dg/plugin/analyzer_cpython_plugin.c
(refcnt_stmt_finder::update_event_loc_info): New.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
Diagnostic path printing was added in r10-5901-g4bc1899b2e883f. As of
that commit, with -fdiagnostics-path-format=inline-events (the default),
we print a vertical line to the left of the source line numbering,
visualizing the stack depth and interprocedural calls and returns as
indentation changes.
For cases where the events on a thread are purely interprocedural, this
line does nothing except take up space and complicate the output.
This patch adds logic to omit it for such cases, simpifying the output,
and, I believe, improving readability.
gcc/ChangeLog:
* diagnostic-path.h: Update leading comment to reflect
intraprocedural cases. Fix typo in comment.
* doc/invoke.texi: Update intraprocedural example.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/allocation-size-multiline-1.c: Update
expected results for purely intraprocedural path.
* c-c++-common/analyzer/allocation-size-multiline-2.c: Likewise.
* c-c++-common/analyzer/allocation-size-multiline-3.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-0.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-1.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-2.c: Likewise.
* c-c++-common/analyzer/analyzer-verbosity-3.c: Likewise.
* c-c++-common/analyzer/malloc-macro-inline-events.c: Likewise.
Doing so for this file requires a rewrite since the paths
prefixing the "in expansion of macro" lines become the only thing
on their line and so are no longer pruned by multiline.exp logic
for pruning extra content on non-blank lines.
* c-c++-common/analyzer/malloc-paths-9-noexcept.c: Likewise.
* c-c++-common/analyzer/setjmp-2.c: Likewise.
* gcc.dg/analyzer/malloc-paths-9.c: Likewise.
* gcc.dg/analyzer/out-of-bounds-multiline-2.c: Likewise.
* gcc.dg/plugin/diagnostic-test-paths-2.c: Likewise.
gcc/ChangeLog:
* tree-diagnostic-path.cc (per_thread_summary::interprocedural_p):
New.
(thread_event_printer::print_swimlane_for_event_range): Don't
indent and print the stack depth line if this thread's events are
purely intraprocedural.
(selftest::test_intraprocedural_path): Update expected output.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/analyzer/ChangeLog:
PR analyzer/114899
* access-diagram.cc
(written_svalue_spatial_item::get_label_string): Bulletproof
against SSA_NAME_VAR being null.
gcc/testsuite/ChangeLog:
PR analyzer/114899
* c-c++-common/analyzer/out-of-bounds-diagram-pr114899.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
As part of PR analyzer/96395, these patches moved testcases from
gcc.dg/analyzer to c-c++-common/analyzer:
- r14-3503-g55f6a7d949abc7
- r14-3823-g50b5199cff6908
- r14-6564-gae034b9106fbdd
Unfortunately this led to numerous g++ testsuite failures on Solaris,
tracked as PR analyzer/111475.
Almost all of the failures are due to standard library differences where
including a C standard library on C++ e.g. <stdlib.h> leads to the plain
symbols referencing the symbols "std::" via a "using" declaration,
whereas I had written the code expecting them to use symbols in the root
namespace.
The analyzer has special-case handling of many functions by name.
This patch generalizes such handling to also match against functions
in "std::" for all of the cases I found in the testsuite (via manual
inspection of the preprocessed test cases against Solaris headers).
This fixes cases where the analyzer was failing to "know about" the
behavior of such functions.
Other such failures are due to "std::" prefixes appearing in names of
functions in the output, leading to mismatches against expected output.
The patch adds regexes to some cases, and moves some other cases back
from c-c++-common to gcc.dg where the dg-multiline syntax isn't
expressive enough.
Various "fd-*.c" failures relate to Solaris's socket-handling functions
not being marked with "noexcept", where due to PR analyzer/97111 we
mishandle the exception-handling edges in the CFG, leading to leak
false positives. The patch works around this by adding -fno-exceptions
to these cases, pending a proper fix for PR analyzer/97111.
gcc/analyzer/ChangeLog:
PR analyzer/111475
* analyzer.cc (is_special_named_call_p): Add "look_in_std" param.
(is_std_function_p): Make non-static.
* analyzer.h (is_special_named_call_p): Add optional "look_in_std"
param.
(is_std_function_p): New decl.
* engine.cc (stmt_requires_new_enode_p): Look for both "signal"
and "std::signal".
* kf.cc (register_known_functions): Add various "std::" copies
of the known functions.
* known-function-manager.cc
(known_function_manager::~known_function_manager): Clean up
m_std_ns_map_id_to_kf.
(known_function_manager::add_std_ns): New.
(known_function_manager::get_match): Also look for known "std::"
functions.
(known_function_manager::get_by_identifier_in_std_ns): New.
* known-function-manager.h
(known_function_manager::add_std_ns): New decl.
(known_function_manager::get_by_identifier_in_std_ns): New decl.
(known_function_manager::m_std_ns_map_id_to_kf): New field.
* sm-file.cc (register_known_file_functions): Add various "std::"
copies of the known functions.
* sm-malloc.cc (malloc_state_machine::on_stmt): Handle
"std::realloc".
* sm-signal.cc (signal_unsafe_p): Consider "std::" copies of the
functions as also being async-signal-unsafe.
(signal_state_machine::on_stmt): Consider "std::signal".
gcc/testsuite/ChangeLog:
PR analyzer/111475
* c-c++-common/analyzer/fd-glibc-byte-stream-socket.c: Add
-fno-exceptions for now.
* c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c: Likewise.
* c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c: Rename to...
* c-c++-common/analyzer/fd-manpage-getaddrinfo-server.c: ...this, and
add -fno-exceptions for now.
* c-c++-common/analyzer/fd-socket-meaning.c: Add -fno-exceptions
for now.
* c-c++-common/analyzer/fd-symbolic-socket.c: Likewise.
* c-c++-common/analyzer/flexible-array-member-1.c: Use regexp to
handle C vs C++ differences in spelling of function name, which
could have a "std::" prefix on some targets.
* c-c++-common/analyzer/pr106539.c: Likewise.
* c-c++-common/analyzer/malloc-ipa-8-unchecked.c: Move back to...
* gcc.dg/analyzer/malloc-ipa-8-unchecked.c: ...here, dropping
attempt to generalize output for C vs C++.
* c-c++-common/analyzer/signal-4a.c: Move back to...
* gcc.dg/analyzer/signal-4a.c: ...here, dropping attempt to
generalize output for C vs C++.
* c-c++-common/analyzer/signal-4b.c: Move back to...
* gcc.dg/analyzer/signal-4b.c: ...here, dropping attempt to
generalize output for C vs C++.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
I made several attempts to fix this properly, but for now apply
a band-aid to at least prevent crashing on such cases.
gcc/analyzer/ChangeLog:
PR analyzer/114472
* access-diagram.cc (bit_size_expr::maybe_get_formatted_str):
Reject attempts to print sizes that are too large.
* region.cc (region_offset::calc_symbolic_bit_offset): Use a
typeless svalue for the bit offset.
* store.cc (bit_range::intersects_p): Replace assertion with
test.
(bit_range::exceeds_p): Likewise.
(bit_range::falls_short_of_p): Likewise.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/out-of-bounds-pr114472.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/memset-1.c: Clarify some comments.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
2024-03-28 John David Anglin <danglin@gcc.gnu.org>
gcc/testsuite/ChangeLog:
PR analyzer/111289
* c-c++-common/analyzer/stdarg-pr111289-int.c: Don't include
<limits.h>.
|
|
[PR114408]
gcc/analyzer/ChangeLog:
PR analyzer/114408
* engine.cc (impl_run_checkers): Free up any dominance info that
we may have created.
* kf.cc (class kf_ubsan_handler): New.
(register_sanitizer_builtins): New.
(register_known_functions): Call register_sanitizer_builtins.
gcc/testsuite/ChangeLog:
PR analyzer/114408
* c-c++-common/analyzer/deref-before-check-pr114408.c: New test.
* c-c++-common/ubsan/analyzer-ice-pr114408.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/analyzer/ChangeLog:
PR analyzer/113619
* region-model.cc (region_model::eval_condition): Fix
cast-handling from r14-3632-ge7b267444045c5 so that if those give
an unknown result, we continue trying the constraint manager.
gcc/testsuite/ChangeLog:
PR analyzer/113619
* c-c++-common/analyzer/taint-divisor-pr113619.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
header macro [PR109251]
gcc/analyzer/ChangeLog:
PR analyzer/109251
* sm-malloc.cc (deref_before_check::emit): Reject cases where the
check is in a loop header within a macro expansion.
(deref_before_check::loop_header_p): New.
gcc/testsuite/ChangeLog:
PR analyzer/109251
* c-c++-common/analyzer/deref-before-check-pr109251-1.c: New test.
* c-c++-common/analyzer/deref-before-check-pr109251-2.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
In r14-1497-gef768035ae8090 I added some support to the analyzer for
__atomic_ builtins (enough to fix false positives I was seeing in
my integration tests).
Unfortunately I messed up the implementation of
__atomic_{exchange,load,store}, leading to ICEs seen in
PR analyzer/114286.
Fixed thusly, fixing the ICEs. Given that we're in stage 4, the patch
doesn't add support for any of the various __atomic_compare_exchange
builtins, so that these continue to fall back to the analyzer's
"anything could happen" handling of unknown functions.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/ChangeLog:
PR analyzer/114286
* kf.cc (class kf_atomic_exchange): Reimplement based on signature
seen in gimple, rather than user-facing signature.
(class kf_atomic_load): Likewise.
(class kf_atomic_store): New.
(register_atomic_builtins): Register kf_atomic_store.
gcc/testsuite/ChangeLog:
PR analyzer/114286
* c-c++-common/analyzer/atomic-builtins-pr114286.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
[PR110902,PR110928,PR111305,PR111441]
Various analyzer ICEs in our bugzilla relate to sloppy use of types
within bounds-checking.
The bounds-checking code works by comparing symbolic *bit* offsets, and
we don't have a good user-facing type that can represent such an offset
(ptrdiff_type_node is for *byte* offsets).
ana::svalue doesn't enforce valid combinations of types for things like
binary operations. When I added the access diagrams for GCC 14, this
could lead to attempts to generate trees for such svalues, leading to
trees with invalid combinations of types (e.g. PLUS_EXPR or MULT_EXPR of
incompatible types), leading to ICEs inside the tree folding logic.
I tried two approaches to fixing this.
My first approach was to fix the type-handling throughout the
bounds-checking code to use correct types, using size_type_node for
sizes, ptrdiff_type_node for byte offsets, and trying ptrdiff_type_node
for bit offsets. I implemented this, and it fixed the crashes, but
unfortunately it led to:
(a) numerous false negatives from the bounds-checking code, due to it
becoming unable to be sure that the accessed offset was beyond the valid
bounds, due to the expressions involved gaining complicated sets of
nested casts.
(b) ugly access diagrams full of nested casts (for capacities, gap
measurements, etc)
So my second approach, implemented in this patch, is to accept that we
don't have a tree type for representing bit offsets. The patch
represents bit offsets using "typeless" symbolic values i.e. ones for
which get_type () is NULL_TREE, and implements enough support for basic
arithemetic as if these are mathematical integers (albeit ones for which
concrete values within an expression must fit within a signed wide int).
Such values can't be converted to tree, so the patch avoids such
conversions, instead implementing a new svalue::maybe_print_for_user for
printing them to a pretty_printer. The patch uses ptrdiff_type_node for
byte offsets.
Doing so fixes the crashes, whilst appearing to preserve the behavior of
-Wanalyzer-out-of-bounds in my testing.
gcc/analyzer/ChangeLog:
PR analyzer/110902
PR analyzer/110928
PR analyzer/111305
PR analyzer/111441
* access-diagram.cc: Include "analyzer/analyzer-selftests.h".
(get_access_size_str): Reimplement for conversion of
implmementation of bit_size_expr from tree to const svalue &. Use
svalue::maybe_print_for_user rather than tree printing routines.
(remove_ssa_names): Make non-static.
(bit_size_expr::get_formatted_str): Rename to...
(bit_size_expr::maybe_get_formatted_str): ...this, adding "model"
param and converting return type to a unique_ptr. Update for
conversion of implementation of bit_size_expr from tree to
const svalue &. Use svalue::maybe_print_for_user rather than tree
printing routines.
(bit_size_expr::print): Rename to...
(bit_size_expr::maybe_print_for_user): ...this, adding "model"
param and converting return type to bool. Update for
conversion of implementation of bit_size_expr from tree to
const svalue &. Use svalue::maybe_print_for_user rather than tree
printing routines.
(bit_size_expr::maybe_get_as_bytes): Add "mgr" param and convert
return type from tree to const svalue *; reimplement.
(access_range::access_range): Call strip_types when on region_offset
intializations.
(access_range::get_size): Update for conversion of implementation
of bit_size_expr from tree to const svalue &.
(access_operation::get_valid_bits): Pass manager to access_range
ctor.
(access_operation::maybe_get_invalid_before_bits): Likewise.
(access_operation::maybe_get_invalid_after_bits): Likewise.
(boundaries::add): Likewise.
(bit_to_table_map::populate): Add "mgr" param and pass it to
access_range ctor.
(access_diagram_impl::access_diagram_impl): Pass manager to
bit_to_table_map::populate.
(access_diagram_impl::maybe_add_gap): Use svalue rather than tree
for symbolic bit offsets. Port to new bit_size_expr
representation.
(access_diagram_impl::add_valid_vs_invalid_ruler): Port to new
bit_size_expr representation.
(selftest::assert_eq_typeless_integer): New.
(ASSERT_EQ_TYPELESS_INTEGER): New.
(selftest::test_bit_size_expr_to_bytes): New.
(selftest::analyzer_access_diagram_cc_tests): New.
* access-diagram.h (class bit_size_expr): Reimplement, converting
implementation from tree to const svalue &.
(access_range::access_range): Add "mgr" param. Call strip_types
on region_offset initializations.
(access_range::get_size): Update decl for reimplementation.
* analyzer-selftests.cc (selftest::run_analyzer_selftests): Call
selftest::analyzer_access_diagram_cc_tests.
* analyzer-selftests.h
(selftest::analyzer_checker_script_cc_tests): Delete this stray
typo.
(selftest::analyzer_access_diagram_cc_tests): New decl.
* analyzer.h (print_expr_for_user): New decl.
(calc_symbolic_bit_offset): Update decl for reimplementation.
(strip_types): New decls.
(remove_ssa_names): New decl.
* bounds-checking.cc (strip_types): New.
(region_model::check_symbolic_bounds): Use typeless svalues.
* region-model-manager.cc
(region_model_manager::get_or_create_constant_svalue): Add "type"
param. Add overload with old signature.
(region_model_manager::get_or_create_int_cst): Support type being
NULL_TREE.
(region_model_manager::maybe_fold_unaryop): Gracefully reject folding
of casts to NULL_TREE type.
(get_code_for_cast): Use NOP_EXPR for "casting" svalues to
NULL_TREE type.
(region_model_manager::get_or_create_cast): Support "casting"
svalues to NULL_TREE type.
(region_model_manager::maybe_fold_binop): Don't crash on inputs
with NULL_TREE type. Handle folding of binops on constants with
NULL_TREE type. Add missing cast from PR analyzer/110902.
Support enough folding of other ops on NULL_TREE type to support
bounds checking.
(region_model_manager::get_or_create_const_fn_result_svalue):
Remove assertion that type is nonnull.
* region-model-manager.h
(region_model_manager::get_or_create_constant_svalue): Add
overloaded decl taking a type.
(region_model_manager::maybe_fold_binop): Make public.
(region_model_manager::constants_map_t): Use
constant_svalue::key_t for the key, rather than just tree.
* region-model.cc (print_expr_for_user): New.
(selftest::test_array_2): Handle casts.
* region.cc (region_offset::calc_symbolic_bit_offset): Return
const svalue & rather than tree, and reimplement accordingly.
(region::calc_offset): Use ptrdiff_type_node for types of byte
offsets.
(region::maybe_print_for_user): New.
(element_region::get_relative_symbolic_offset): Use NULL_TREE for
types of bit offsets.
(offset_region::get_bit_offset): Likewise.
(sized_region::get_bit_size_sval): Likewise for bit sizes.
* region.h (region::maybe_print_for_user): New decl.
* svalue.cc (class auto_add_parens): New.
(svalue::maybe_print_for_user): New.
(svalue::cmp_ptr): Support typeless constant svalues.
(tristate_from_boolean_tree_node): New, taken from...
(constant_svalue::eval_condition): ...here. Handle comparison of
typeless integer svalue constants.
* svalue.h (svalue::maybe_print_for_user): New decl.
(class constant_svalue): Support the type of the svalue being
NULL_TREE.
(struct default_hash_traits<constant_svalue::key_t>): New.
gcc/ChangeLog:
PR analyzer/110902
PR analyzer/110928
PR analyzer/111305
PR analyzer/111441
* selftest.h (ASSERT_NE_AT): New macro.
gcc/testsuite/ChangeLog:
PR analyzer/110902
PR analyzer/110928
PR analyzer/111305
PR analyzer/111441
* c-c++-common/analyzer/out-of-bounds-const-fn.c: New test.
* c-c++-common/analyzer/out-of-bounds-diagram-11.c: Update
expected diagram output.
* c-c++-common/analyzer/out-of-bounds-diagram-pr110928.c: New test.
* c-c++-common/analyzer/out-of-bounds-diagram-pr111305.c: New test.
* c-c++-common/analyzer/out-of-bounds-diagram-pr111441.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
As the tests assume that strndup() is visible (only part of
POSIX.1-2008) define the guard to ensure that it's visible. Currently,
glibc appears to always have this defined in C++, newlib does not.
Without this patch, fails like this can be seen:
Testing analyzer/strndup-1.c, -std=c++98
.../strndup-1.c: In function 'void test_1(const char*)':
.../strndup-1.c:11:13: error: 'strndup' was not declared in this scope; did you mean 'strncmp'?
.../strndup-1.c: In function 'void test_2(const char*)':
.../strndup-1.c:16:13: error: 'strndup' was not declared in this scope; did you mean 'strncmp'?
.../strndup-1.c: In function 'void test_3(const char*)':
.../strndup-1.c:21:13: error: 'strndup' was not declared in this scope; did you mean 'strncmp'?
Patch has been verified on Linux.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/strndup-1.c: Define _POSIX_C_SOURCE.
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
|
|
On arm-none-eabi, the test case fails with below warning on GCC13
.../null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:63:65: warning: converting a packed 'enum obj_type' pointer (alignment 1) to a 'struct connection' pointer (alignment 4) may result in an unaligned pointer value [-Waddress-of-packed-member]
Add a dg-bogus to ensure that the warning is not reintroduced.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c:
Added dg-bogus with target on offending line for short_enums.
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
|
|
PR analyzer/114159 reports an ICE inside playback of call summaries
for very low values of --param=analyzer-max-svalue-depth=VAL.
Root cause is that call_summary_edge_info's ctor tries to evaluate
the function ptr of a gimple call stmt and assumes it gets a function *,
but with low values of --param=analyzer-max-svalue-depth=VAL we get
back an UNKNOWN svalue, rather than a pointer to a specific function.
Fix by adding a new call_info ctor that passes a specific
const function & from the call_summary_edge_info, rather than trying
to compute the function.
In doing so, I noticed that the analyzer was using "function *" despite
not modifying functions, and was sloppy about can-be-null versus
must-be-non-null function pointers, so I "constified" the function, and
converted the many places where the function must be non-null to be
"const function &".
gcc/analyzer/ChangeLog:
PR analyzer/114159
* analyzer.cc: Include "tree-dfa.h".
(get_ssa_default_def): New decl.
* analyzer.h (get_ssa_default_def): New.
* call-info.cc (call_info::call_info): New ctor taking an explicit
called_fn.
* call-info.h (call_info::call_info): Likewise.
* call-summary.cc (call_summary_replay::call_summary_replay):
Convert param from function * to const function &.
* call-summary.h (call_summary_replay::call_summary_replay):
Likewise.
* checker-event.h (state_change_event::get_dest_function):
Constify return value.
* engine.cc (point_and_state::validate): Update for conversion to
const function &.
(exploded_node::on_stmt): Likewise.
(call_summary_edge_info::call_summary_edge_info): Likewise.
Pass in called_fn to call_info ctor.
(exploded_node::replay_call_summaries): Update for conversion to
const function &. Convert per_function_data from * to &.
(exploded_node::replay_call_summary): Update for conversion to
const function &.
(exploded_graph::add_function_entry): Likewise.
(toplevel_function_p): Likewise.
(add_tainted_args_callback): Likewise.
(exploded_graph::build_initial_worklist): Likewise.
(exploded_graph::maybe_create_dynamic_call): Likewise.
(maybe_update_for_edge): Likewise.
(exploded_graph::on_escaped_function): Likewise.
* exploded-graph.h (exploded_node::replay_call_summaries):
Likewise.
(exploded_node::replay_call_summary): Likewise.
(exploded_graph::add_function_entry): Likewise.
* program-point.cc (function_point::from_function_entry):
Likewise.
(program_point::from_function_entry): Likewise.
* program-point.h (function_point::from_function_entry): Likewise.
(program_point::from_function_entry): Likewise.
* program-state.cc (program_state::push_frame): Likewise.
(program_state::get_current_function): Constify return type.
* program-state.h (program_state::push_frame): Update for
conversion to const function &.
(program_state::get_current_function): Likewise.
* region-model-manager.cc
(region_model_manager::get_frame_region): Likewise.
* region-model-manager.h
(region_model_manager::get_frame_region): Likewise.
* region-model.cc (region_model::called_from_main_p): Likewise.
(region_model::update_for_gcall): Likewise.
(region_model::push_frame): Likewise.
(region_model::get_current_function): Constify return type.
(region_model::pop_frame): Update for conversion to
const function &.
(selftest::test_stack_frames): Likewise.
(selftest::test_get_representative_path_var): Likewise.
(selftest::test_state_merging): Likewise.
(selftest::test_alloca): Likewise.
* region-model.h (region_model::push_frame): Likewise.
(region_model::get_current_function): Likewise.
* region.cc (frame_region::dump_to_pp): Likewise.
(frame_region::get_region_for_local): Likewise.
* region.h (class frame_region): Likewise.
* sm-signal.cc (signal_unsafe_call::describe_state_change):
Likewise.
(update_model_for_signal_handler): Likewise.
(signal_delivery_edge_info_t::update_model): Likewise.
(register_signal_handler::impl_transition): Likewise.
* state-purge.cc (class gimple_op_visitor): Likewise.
(state_purge_map::state_purge_map): Likewise.
(state_purge_map::get_or_create_data_for_decl): Likewise.
(state_purge_per_ssa_name::state_purge_per_ssa_name): Likewise.
(state_purge_per_ssa_name::add_to_worklist): Likewise.
(state_purge_per_ssa_name::process_point): Likewise.
(state_purge_per_decl::add_to_worklist): Likewise.
(state_purge_annotator::print_needed): Likewise.
* state-purge.h
(state_purge_map::get_or_create_data_for_decl): Likewise.
(class state_purge_per_tree): Likewise.
(class state_purge_per_ssa_name): Likewise.
(class state_purge_per_decl): Likewise.
* supergraph.cc (supergraph::dump_dot_to_pp): Likewise.
* supergraph.h
(supergraph::get_node_for_function_entry): Likewise.
(supergraph::get_node_for_function_exit): Likewise.
gcc/ChangeLog:
PR analyzer/114159
* function.cc (function_name): Make param const.
* function.h (function_name): Likewise.
gcc/testsuite/ChangeLog:
PR analyzer/114159
* c-c++-common/analyzer/call-summaries-pr114159.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/analyzer/ChangeLog:
PR analyzer/111881
* constraint-manager.cc (bound::ensure_closed): Assert that
m_constant has integral type.
(range::add_bound): Bail out on floating point constants.
gcc/testsuite/ChangeLog:
PR analyzer/111881
* c-c++-common/analyzer/conditionals-pr111881.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/analyzer/ChangeLog:
PR analyzer/113999
* analyzer.h (get_string_cst_size): New decl.
* region-model-manager.cc (get_string_cst_size): New.
(region_model_manager::maybe_get_char_from_string_cst): Treat
single-byte accesses within string_cst but beyond
TREE_STRING_LENGTH as being 0.
* region-model.cc (string_cst_has_null_terminator): Likewise.
gcc/testsuite/ChangeLog:
PR analyzer/113999
* c-c++-common/analyzer/strlen-pr113999.c: New test.
* gcc.dg/analyzer/strlen-1.c: More test coverage.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/analyzer/ChangeLog:
PR analyzer/113998
* ranges.cc (symbolic_byte_range::intersection): Handle empty ranges.
(selftest::test_intersects): Add test coverage for empty ranges.
gcc/testsuite/ChangeLog:
PR analyzer/113998
* c-c++-common/analyzer/overlapping-buffers-pr113998.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/analyzer/ChangeLog:
PR analyzer/111289
* varargs.cc (representable_in_integral_type_p): New.
(va_arg_compatible_types_p): Add "arg_sval" param. Handle integer
types.
(kf_va_arg::impl_call_pre): Pass arg_sval to
va_arg_compatible_types_p.
gcc/testsuite/ChangeLog:
PR analyzer/111289
* c-c++-common/analyzer/stdarg-pr111289-int.c: New test.
* c-c++-common/analyzer/stdarg-pr111289-ptr.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/testsuite/ChangeLog:
PR analyzer/110520
* c-c++-common/analyzer/null-deref-pr110520.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
PR analyzer/111266 reports a missing -Wanalyzer-out-of-bounds when
accessing relative to a concrete byte offset.
Root cause is that offset_region::get_{byte,bit}_size_sval were
attempting to compute the size that's valid to access, rather than the
size of the access attempt.
Fixed by removing these vfunc overrides from offset_region as the
base class implementation does the right thing.
gcc/analyzer/ChangeLog:
PR analyzer/111266
* region.cc (offset_region::get_byte_size_sval): Delete.
(offset_region::get_bit_size_sval): Delete.
* region.h (region::get_byte_size): Add comment clarifying that
this relates to the size of the access, rather than the size
that's valid to access.
(region::get_bit_size): Likewise.
(region::get_byte_size_sval): Likewise.
(region::get_bit_size_sval): Likewise.
(offset_region::get_byte_size_sval): Delete.
(offset_region::get_bit_size_sval): Delete.
gcc/testsuite/ChangeLog:
PR analyzer/111266
* c-c++-common/analyzer/out-of-bounds-pr111266.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
As the tests assume that fileno() is visible (only part of POSIX),
define the guard to ensure that it's visible. Currently, glibc appears
to always have this defined in C++, newlib does not.
Without this patch, fails like this can be seen:
Testing analyzer/fileno-1.c, -std=c++98
.../fileno-1.c: In function 'int test_pass_through(FILE*)':
.../fileno-1.c:5:10: error: 'fileno' was not declared in this scope
FAIL: c-c++-common/analyzer/fileno-1.c -std=c++98 (test for excess errors)
Patch has been verified on Linux.
gcc/testsuite/ChangeLog:
PR testsuite/113278
* c-c++-common/analyzer/fileno-1.c: Define _POSIX_SOURCE.
* c-c++-common/analyzer/flex-with-call-summaries.c: Same.
* c-c++-common/analyzer/flex-without-call-summaries.c: Same.
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
|
|
Fixes the following warnings on x86_64-w64-mingw32:
coreutils-sum-pr108666.c:17:1: warning: conflicting types for built-in function ‘memcpy’; expected ‘void *(void *, const void *, long long unsigned int)’ [-Wbuiltin-declaration-mismatch]
17 | memcpy(void* __restrict __dest, const void* __restrict __src, size_t __n)
| ^~~~~~
coreutils-sum-pr108666.c:25:1: warning: conflicting types for built-in function ‘malloc’; expected ‘void *(long long unsigned int)’ [-Wbuiltin-declaration-mismatch]
25 | malloc(size_t __size) __attribute__((__nothrow__, __leaf__))
| ^~~~~~
gcc/testsuite:
* c-c++-common/analyzer/coreutils-sum-pr108666.c: Use
__SIZE_TYPE__ instead of long unsigned int for size_t
definition.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
|
|
Ensure sp variable is long enough by using __UINTPTR_TYPE__ for
rsp.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/uninit-pr108968-register.c:
Use __UINTPTR_TYPE__ instead of unsigned long for LLP64.
|
|
Avoid ICE with -fanalyzer-verbose-state-changes when
region_model::get_representative_tree returns nullptr in
state_change_event::get_desc.
gcc/analyzer/ChangeLog:
PR analyzer/113509
* checker-event.cc (state_change_event::get_desc): Don't assume
"var" is non-NULL.
gcc/testsuite/ChangeLog:
PR analyzer/113509
* c-c++-common/analyzer/stdarg-pr113509.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
round_up macro [PR113654]
gcc/analyzer/ChangeLog:
PR analyzer/113654
* region-model.cc (is_round_up): New.
(is_multiple_p): New.
(is_dubious_capacity): New.
(region_model::check_region_size): Move usage of size_visitor into
is_dubious_capacity.
gcc/testsuite/ChangeLog:
PR analyzer/113654
* c-c++-common/analyzer/allocation-size-pr113654-1.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
Confusion in binding_cluster::maybe_get_compound_binding about whether
offsets are relative to the start of the region or to the start of the
cluster was leading to incorrect handling of default values, leading
to false positives from -Wanalyzer-use-of-uninitialized-value, from
-Wanalyzer-exposure-through-uninit-copy, and other logic errors.
Fixed thusly.
gcc/analyzer/ChangeLog:
PR analyzer/112969
* store.cc (binding_cluster::maybe_get_compound_binding): When
populating default_map, express the bit-range of the default key
for REG relative to REG, rather than to the base region.
gcc/testsuite/ChangeLog:
PR analyzer/112969
* c-c++-common/analyzer/compound-assignment-5.c (test_3): Remove
xfails, reorder tests.
* c-c++-common/analyzer/compound-assignment-pr112969.c: New test.
* gcc.dg/plugin/infoleak-pr112969.c: New test.
* gcc.dg/plugin/plugin.exp: Add infoleak-pr112969.c to
analyzer_kernel_plugin.c tests.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
gcc/analyzer/ChangeLog:
PR analyzer/111361
* region-model.cc (svalue_byte_range_has_null_terminator_1): The
initial byte of an all-zeroes SVAL is a zero byte. Remove
gcc_unreachable from SK_CONSTANT for constants that aren't
STRING_CST or INTEGER_CST.
gcc/testsuite/ChangeLog:
PR analyzer/111361
* c-c++-common/analyzer/strlen-pr111361.c: New test.
* c-c++-common/analyzer/strncpy-1.c (test_zero_fill): Remove fixed
xfail.
* c-c++-common/analyzer/strncpy-pr111361.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
PR analyzer/112811 reports an ICE attempting to determine whether a
string is null-terminated.
The root cause is confusion in the code about whether byte offsets are
relative to the start of the base region, or relative to the bound
fragment within the the region.
This patch rewrites the code to enforce a clearer separation between
the kinds of offset, fixing the ICE, and adds logging to help track
down future issues in this area of the code.
gcc/analyzer/ChangeLog:
PR analyzer/112811
* region-model.cc (fragment::dump_to_pp): New.
(fragment::has_null_terminator): Convert to...
(svalue_byte_range_has_null_terminator_1): ...this new function,
updating to use a byte_range relative to the start of the svalue.
(svalue_byte_range_has_null_terminator): New.
(fragment::string_cst_has_null_terminator): Convert to...
(string_cst_has_null_terminator): ...this, updating to use a
byte_range relative to the start of the svalue.
(iterable_cluster::dump_to_pp): New.
(region_model::scan_for_null_terminator): Add logging, moving body
to...
(region_model::scan_for_null_terminator_1): ...this new function,
adding more logging, and updating to use
svalue_byte_range_has_null_terminator.
* region-model.h (region_model::scan_for_null_terminator_1): New
decl.
gcc/testsuite/ChangeLog:
PR analyzer/112811
* c-c++-common/analyzer/strlen-pr112811.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
char index [PR106229]
gcc/analyzer/ChangeLog:
PR analyzer/106229
* analyzer.h (compare_constants): New decl.
* constraint-manager.cc (compare_constants): Make non-static.
* sm-taint.cc: Add include "fold-const.h".
(class concrete_range): New.
(get_possible_range): New.
(index_can_be_out_of_bounds_p): New.
(region_model::check_region_for_taint): Reject
-Wanalyzer-tainted-array-index if the type of the value makes it
impossible for it to be out-of-bounds of the array.
gcc/testsuite/ChangeLog:
PR analyzer/106229
* c-c++-common/analyzer/taint-index-pr106229.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
In particular, accessing the result of *calloc (1, SZ) (if non-NULL)
should be known to be all zeroes.
gcc/analyzer/ChangeLog:
PR analyzer/113333
* region-model-manager.cc
(region_model_manager::maybe_fold_unaryop): Casting all zeroes
should give all zeroes.
gcc/testsuite/ChangeLog:
PR analyzer/113333
* c-c++-common/analyzer/calloc-1.c: Add tests.
* c-c++-common/analyzer/pr96639.c: Update expected results.
* gcc.dg/analyzer/data-model-9.c: Likewise.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
2024-01-14 John David Anglin <danglin@gcc.gnu.org>
gcc/testsuite/ChangeLog:
PR analyzer/113150
* c-c++-common/analyzer/fd-glibc-byte-stream-socket.c: Skip
on hppa*-*-hpux*.
* c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c: Likewise.
* c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c: Likewise.
* c-c++-common/analyzer/fd-symbolic-socket.c: Likewise.
* gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c: Likewise.
|
|
gcc/analyzer/ChangeLog:
PR analyzer/112790
* checker-event.cc (class inlining_info): Move to...
* inlining-iterator.h (class inlining_info): ...here.
* sm-malloc.cc: Include "analyzer/inlining-iterator.h".
(maybe_complain_about_deref_before_check): Reject stmts that were
inlined from another function.
gcc/testsuite/ChangeLog:
PR analyzer/112790
* c-c++-common/analyzer/deref-before-check-pr112790.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
Some new analyzer tests fail on AIX.
gcc/testsuite/ChangeLog:
* c-c++-common/analyzer/capacity-1.c: Skip on AIX.
* c-c++-common/analyzer/capacity-2.c: Same.
* c-c++-common/analyzer/fd-glibc-byte-stream-socket.c: Same.
* c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c: Same.
* c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c: Same.
* gcc.dg/analyzer/fd-glibc-byte-stream-connection-server.c: Same.
Signed-off-by: David Edelsohn <dje.gcc@gmail.com>
|
|
PR analyzer/112792 reports false positives from -fanalyzer's
bounds-checking on certain packed structs containing bitfields e.g.
in the Linux kernel's drivers/dma/idxd/device.c:
union msix_perm {
struct {
u32 rsvd2 : 8;
u32 pasid : 20;
};
u32 bits;
} __attribute__((__packed__));
The root cause is that the bounds-checking is done using byte offsets
and ranges; in the above, an access of "pasid" is treated as a 32-bit
access starting one byte inside the union, thus accessing byte offsets
1-4 when only offsets 0-3 are valid.
This patch updates the bounds-checking to use bit offsets and ranges
wherever possible - for concrete offsets and capacities. In the above
accessing "pasid" is treated as bits 8-27 of a 32-bit region, fixing the
false positive.
Symbolic offsets and ranges are still handled at byte granularity.
gcc/analyzer/ChangeLog:
PR analyzer/112792
* bounds-checking.cc
(out_of_bounds::oob_region_creation_event_capacity): Rename
"capacity" to "byte_capacity". Layout fix.
(out_of_bounds::::add_region_creation_events): Rename
"capacity" to "byte_capacity".
(class concrete_out_of_bounds): Rename m_out_of_bounds_range to
m_out_of_bounds_bits and convert from a byte_range to a bit_range.
(concrete_out_of_bounds::get_out_of_bounds_bytes): New.
(concrete_past_the_end::concrete_past_the_end): Rename param
"byte_bound" to "bit_bound". Initialize m_byte_bound.
(concrete_past_the_end::subclass_equal_p): Update for renaming
of m_byte_bound to m_bit_bound.
(concrete_past_the_end::m_bit_bound): New field.
(concrete_buffer_overflow::concrete_buffer_overflow): Convert
param "range" from byte_range to bit_range. Rename param
"byte_bound" to "bit_bound".
(concrete_buffer_overflow::emit): Update for bits vs bytes.
(concrete_buffer_overflow::describe_final_event): Split
into...
(concrete_buffer_overflow::describe_final_event_as_bytes): ...this
(concrete_buffer_overflow::describe_final_event_as_bits): ...and
this.
(concrete_buffer_over_read::concrete_buffer_over_read): Convert
param "range" from byte_range to bit_range. Rename param
"byte_bound" to "bit_bound".
(concrete_buffer_over_read::emit): Update for bits vs bytes.
(concrete_buffer_over_read::describe_final_event): Split into...
(concrete_buffer_over_read::describe_final_event_as_bytes):
...this
(concrete_buffer_over_read::describe_final_event_as_bits): ...and
this.
(concrete_buffer_underwrite::concrete_buffer_underwrite): Convert
param "range" from byte_range to bit_range.
(concrete_buffer_underwrite::describe_final_event): Split into...
(concrete_buffer_underwrite::describe_final_event_as_bytes):
...this
(concrete_buffer_underwrite::describe_final_event_as_bits): ...and
this.
(concrete_buffer_under_read::concrete_buffer_under_read): Convert
param "range" from byte_range to bit_range.
(concrete_buffer_under_read::describe_final_event): Split into...
(concrete_buffer_under_read::describe_final_event_as_bytes):
...this
(concrete_buffer_under_read::describe_final_event_as_bits): ...and
this.
(region_model::check_region_bounds): Use bits for concrete values,
and rename locals to indicate whether we're dealing with bits or
bytes. Specifically, replace "num_bytes_sval" with
"num_bits_sval", and get it from reg's "get_bit_size_sval".
Replace "num_bytes_tree" with "num_bits_tree". Rename "capacity"
to "byte_capacity". Rename "cst_capacity_tree" to
"cst_byte_capacity_tree". Replace "offset" and
"num_bytes_unsigned" with "bit_offset" and "num_bits_unsigned"
respectively, converting from byte_offset_t to bit_offset_t.
Replace "out" and "read_bytes" with "bits_outside" and "read_bits"
respectively, converting from byte_range to bit_range. Convert
"buffer" from byte_range to bit_range. Replace "byte_bound" with
"bit_bound".
* region.cc (region::get_bit_size_sval): New.
(offset_region::get_bit_offset): New.
(offset_region::get_bit_size_sval): New.
(sized_region::get_bit_size_sval): New.
(bit_range_region::get_bit_size_sval): New.
* region.h (region::get_bit_size_sval): New vfunc.
(offset_region::get_bit_offset): New decl.
(offset_region::get_bit_size_sval): New decl.
(sized_region::get_bit_size_sval): New decl.
(bit_range_region::get_bit_size_sval): New decl.
* store.cc (bit_range::intersects_p): New, based on
byte_range::intersects_p.
(bit_range::exceeds_p): New, based on byte_range::exceeds_p.
(bit_range::falls_short_of_p): New, based on
byte_range::falls_short_of_p.
(byte_range::intersects_p): Delete.
(byte_range::exceeds_p): Delete.
(byte_range::falls_short_of_p): Delete.
* store.h (bit_range::intersects_p): New overload.
(bit_range::exceeds_p): New.
(bit_range::falls_short_of_p): New.
(byte_range::intersects_p): Delete.
(byte_range::exceeds_p): Delete.
(byte_range::falls_short_of_p): Delete.
gcc/testsuite/ChangeLog:
PR analyzer/112792
* c-c++-common/analyzer/out-of-bounds-pr112792.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|
|
Move a further 268 tests from gcc.dg/analyzer to c-c++-common/analyzer.
gcc/testsuite/ChangeLog:
PR analyzer/96395
* c-c++-common/analyzer/analyzer-decls.h: New header.
* gcc.dg/analyzer/20020129-1.c: Move to...
* c-c++-common/analyzer/20020129-1.c: ...here.
* gcc.dg/analyzer/SARD-tc117-basic-00001-min.c: Move to...
* c-c++-common/analyzer/SARD-tc117-basic-00001-min.c: ...here.
* gcc.dg/analyzer/SARD-tc249-basic-00034-min.c: Move to...
* c-c++-common/analyzer/SARD-tc249-basic-00034-min.c: ...here.
* gcc.dg/analyzer/abort.c: Move to...
* c-c++-common/analyzer/abort.c: ...here.
* gcc.dg/analyzer/aliasing-1.c: Move to...
* c-c++-common/analyzer/aliasing-1.c: ...here.
* gcc.dg/analyzer/aliasing-2.c: Move to...
* c-c++-common/analyzer/aliasing-2.c: ...here.
* gcc.dg/analyzer/alloca-leak.c: Move to...
* c-c++-common/analyzer/alloca-leak.c: ...here.
* gcc.dg/analyzer/analyzer-debugging-fns-1.c: Move to...
* c-c++-common/analyzer/analyzer-debugging-fns-1.c: ...here.
* gcc.dg/analyzer/analyzer-verbosity-2a.c: Move to...
* c-c++-common/analyzer/analyzer-verbosity-2a.c: ...here.
* gcc.dg/analyzer/analyzer-verbosity-3a.c: Move to...
* c-c++-common/analyzer/analyzer-verbosity-3a.c: ...here.
* gcc.dg/analyzer/asm-x86-1.c: Move to...
* c-c++-common/analyzer/asm-x86-1.c: ...here.
* gcc.dg/analyzer/attr-alloc_size-3.c: Move to...
* c-c++-common/analyzer/attr-alloc_size-3.c: ...here.
* gcc.dg/analyzer/attr-const-1.c: Move to...
* c-c++-common/analyzer/attr-const-1.c: ...here.
* gcc.dg/analyzer/attr-const-2.c: Move to...
* c-c++-common/analyzer/attr-const-2.c: ...here.
* gcc.dg/analyzer/attr-const-3.c: Move to...
* c-c++-common/analyzer/attr-const-3.c: ...here.
* gcc.dg/analyzer/attr-malloc-2.c: Move to...
* c-c++-common/analyzer/attr-malloc-2.c: ...here.
* gcc.dg/analyzer/attr-malloc-4.c: Move to...
* c-c++-common/analyzer/attr-malloc-4.c: ...here.
* gcc.dg/analyzer/attr-malloc-5.c: Move to...
* c-c++-common/analyzer/attr-malloc-5.c: ...here.
* gcc.dg/analyzer/attr-malloc-misuses.c: Move to...
* c-c++-common/analyzer/attr-malloc-misuses.c: ...here.
* gcc.dg/analyzer/attr-tainted_args-misuses.c: Move to...
* c-c++-common/analyzer/attr-tainted_args-misuses.c: ...here.
* gcc.dg/analyzer/bzip2-arg-parse-1.c: Move to...
* c-c++-common/analyzer/bzip2-arg-parse-1.c: ...here.
* gcc.dg/analyzer/call-summaries-1.c: Move to...
* c-c++-common/analyzer/call-summaries-1.c: ...here.
* gcc.dg/analyzer/call-summaries-3.c: Move to...
* c-c++-common/analyzer/call-summaries-3.c: ...here.
* gcc.dg/analyzer/call-summaries-asm-x86.c: Move to...
* c-c++-common/analyzer/call-summaries-asm-x86.c: ...here.
* gcc.dg/analyzer/callbacks-1.c: Move to...
* c-c++-common/analyzer/callbacks-1.c: ...here.
* gcc.dg/analyzer/callbacks-2.c: Move to...
* c-c++-common/analyzer/callbacks-2.c: ...here.
* gcc.dg/analyzer/callbacks-3.c: Move to...
* c-c++-common/analyzer/callbacks-3.c: ...here.
* gcc.dg/analyzer/capacity-2.c: Move to...
* c-c++-common/analyzer/capacity-2.c: ...here.
* gcc.dg/analyzer/capacity-3.c: Move to...
* c-c++-common/analyzer/capacity-3.c: ...here.
* gcc.dg/analyzer/casts-1.c: Move to...
* c-c++-common/analyzer/casts-1.c: ...here.
* gcc.dg/analyzer/casts-2.c: Move to...
* c-c++-common/analyzer/casts-2.c: ...here.
* gcc.dg/analyzer/clobbers-1.c: Move to...
* c-c++-common/analyzer/clobbers-1.c: ...here.
* gcc.dg/analyzer/compound-assignment-4.c: Move to...
* c-c++-common/analyzer/compound-assignment-4.c: ...here.
* gcc.dg/analyzer/data-model-12.c: Move to...
* c-c++-common/analyzer/data-model-12.c: ...here.
* gcc.dg/analyzer/data-model-14.c: Move to...
* c-c++-common/analyzer/data-model-14.c: ...here.
* gcc.dg/analyzer/data-model-18.c: Move to...
* c-c++-common/analyzer/data-model-18.c: ...here.
* gcc.dg/analyzer/data-model-2.c: Move to...
* c-c++-common/analyzer/data-model-2.c: ...here.
* gcc.dg/analyzer/data-model-20.c: Move to...
* c-c++-common/analyzer/data-model-20.c: ...here.
* gcc.dg/analyzer/data-model-21.c: Move to...
* c-c++-common/analyzer/data-model-21.c: ...here.
* gcc.dg/analyzer/data-model-22.c: Move to...
* c-c++-common/analyzer/data-model-22.c: ...here.
* gcc.dg/analyzer/data-model-4.c: Move to...
* c-c++-common/analyzer/data-model-4.c: ...here.
* gcc.dg/analyzer/data-model-5d.c: Move to...
* c-c++-common/analyzer/data-model-5d.c: ...here.
* gcc.dg/analyzer/data-model-8.c: Move to...
* c-c++-common/analyzer/data-model-8.c: ...here.
* gcc.dg/analyzer/data-model-path-1.c: Move to...
* c-c++-common/analyzer/data-model-path-1.c: ...here.
* gcc.dg/analyzer/deref-before-check-2.c: Move to...
* c-c++-common/analyzer/deref-before-check-2.c: ...here.
* gcc.dg/analyzer/deref-before-check-macro-pr108745.c: Move to...
* c-c++-common/analyzer/deref-before-check-macro-pr108745.c: ...here.
* gcc.dg/analyzer/deref-before-check-qemu-qtest_rsp_args.c: Move to...
* c-c++-common/analyzer/deref-before-check-qemu-qtest_rsp_args.c:
...here.
* gcc.dg/analyzer/disabling.c: Move to...
* c-c++-common/analyzer/disabling.c: ...here.
* gcc.dg/analyzer/dump-state.c: Move to...
* c-c++-common/analyzer/dump-state.c: ...here.
* gcc.dg/analyzer/edges-2.c: Move to...
* c-c++-common/analyzer/edges-2.c: ...here.
* gcc.dg/analyzer/equivalence.c: Move to...
* c-c++-common/analyzer/equivalence.c: ...here.
* gcc.dg/analyzer/errno-1.c: Move to...
* c-c++-common/analyzer/errno-1.c: ...here.
* gcc.dg/analyzer/errno-___errno.c: Move to...
* c-c++-common/analyzer/errno-___errno.c: ...here.
* gcc.dg/analyzer/errno-__error.c: Move to...
* c-c++-common/analyzer/errno-__error.c: ...here.
* gcc.dg/analyzer/errno-global-var.c: Move to...
* c-c++-common/analyzer/errno-global-var.c: ...here.
* gcc.dg/analyzer/errno-pr107777.c: Move to...
* c-c++-common/analyzer/errno-pr107777.c: ...here.
* gcc.dg/analyzer/error-3.c: Move to...
* c-c++-common/analyzer/error-3.c: ...here.
* gcc.dg/analyzer/error-uninit.c: Move to...
* c-c++-common/analyzer/error-uninit.c: ...here.
* gcc.dg/analyzer/factorial.c: Move to...
* c-c++-common/analyzer/factorial.c: ...here.
* gcc.dg/analyzer/fd-1.c: Move to...
* c-c++-common/analyzer/fd-1.c: ...here.
* gcc.dg/analyzer/fd-2.c: Move to...
* c-c++-common/analyzer/fd-2.c: ...here.
* gcc.dg/analyzer/fd-3.c: Move to...
* c-c++-common/analyzer/fd-3.c: ...here.
* gcc.dg/analyzer/fd-bind-pr107928.c: Move to...
* c-c++-common/analyzer/fd-bind-pr107928.c: ...here.
* gcc.dg/analyzer/fd-connect-pr107928.c: Move to...
* c-c++-common/analyzer/fd-connect-pr107928.c: ...here.
* gcc.dg/analyzer/fd-glibc-byte-stream-socket.c: Move to...
* c-c++-common/analyzer/fd-glibc-byte-stream-socket.c: ...here.
* gcc.dg/analyzer/fd-manpage-getaddrinfo-client.c: Move to...
* c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c: ...here.
* gcc.dg/analyzer/fd-mappage-getaddrinfo-server.c: Move to...
* c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c: ...here.
* gcc.dg/analyzer/fd-meaning.c: Move to...
* c-c++-common/analyzer/fd-meaning.c: ...here.
* gcc.dg/analyzer/fd-socket-meaning.c: Move to...
* c-c++-common/analyzer/fd-socket-meaning.c: ...here.
* gcc.dg/analyzer/fd-symbolic-socket.c: Move to...
* c-c++-common/analyzer/fd-symbolic-socket.c: ...here.
* gcc.dg/analyzer/fd-uninit-1.c: Move to...
* c-c++-common/analyzer/fd-uninit-1.c: ...here.
* gcc.dg/analyzer/feasibility-1.c: Move to...
* c-c++-common/analyzer/feasibility-1.c: ...here.
* gcc.dg/analyzer/feasibility-2.c: Move to...
* c-c++-common/analyzer/feasibility-2.c: ...here.
* gcc.dg/analyzer/feasibility-4.c: Move to...
* c-c++-common/analyzer/feasibility-4.c: ...here.
* gcc.dg/analyzer/feasibility-pr107948.c: Move to...
* c-c++-common/analyzer/feasibility-pr107948.c: ...here.
* gcc.dg/analyzer/ferror-1.c: Move to...
* c-c++-common/analyzer/ferror-1.c: ...here.
* gcc.dg/analyzer/fibonacci.c: Move to...
* c-c++-common/analyzer/fibonacci.c: ...here.
* gcc.dg/analyzer/file-1.c: Move to...
* c-c++-common/analyzer/file-1.c: ...here.
* gcc.dg/analyzer/file-3.c: Move to...
* c-c++-common/analyzer/file-3.c: ...here.
* gcc.dg/analyzer/file-meaning-1.c: Move to...
* c-c++-common/analyzer/file-meaning-1.c: ...here.
* gcc.dg/analyzer/malloc-ipa-10.c: Move to...
* c-c++-common/analyzer/malloc-ipa-10.c: ...here.
* gcc.dg/analyzer/malloc-ipa-12.c: Move to...
* c-c++-common/analyzer/malloc-ipa-12.c: ...here.
* gcc.dg/analyzer/malloc-ipa-13a.c: Move to...
* c-c++-common/analyzer/malloc-ipa-13a.c: ...here.
* gcc.dg/analyzer/malloc-ipa-9.c: Move to...
* c-c++-common/analyzer/malloc-ipa-9.c: ...here.
* gcc.dg/analyzer/malloc-many-paths-1.c: Move to...
* c-c++-common/analyzer/malloc-many-paths-1.c: ...here.
* gcc.dg/analyzer/malloc-many-paths-3.c: Move to...
* c-c++-common/analyzer/malloc-many-paths-3.c: ...here.
* gcc.dg/analyzer/malloc-meaning-1.c: Move to...
* c-c++-common/analyzer/malloc-meaning-1.c: ...here.
* gcc.dg/analyzer/malloc-paths-1.c: Move to...
* c-c++-common/analyzer/malloc-paths-1.c: ...here.
* gcc.dg/analyzer/malloc-paths-2.c: Move to...
* c-c++-common/analyzer/malloc-paths-2.c: ...here.
* gcc.dg/analyzer/malloc-paths-3.c: Move to...
* c-c++-common/analyzer/malloc-paths-3.c: ...here.
* gcc.dg/analyzer/malloc-paths-4.c: Move to...
* c-c++-common/analyzer/malloc-paths-4.c: ...here.
* gcc.dg/analyzer/malloc-paths-5.c: Move to...
* c-c++-common/analyzer/malloc-paths-5.c: ...here.
* gcc.dg/analyzer/malloc-paths-6.c: Move to...
* c-c++-common/analyzer/malloc-paths-6.c: ...here.
* gcc.dg/analyzer/malloc-paths-7.c: Move to...
* c-c++-common/analyzer/malloc-paths-7.c: ...here.
* gcc.dg/analyzer/malloc-paths-8.c: Move to...
* c-c++-common/analyzer/malloc-paths-8.c: ...here.
* gcc.dg/analyzer/malloc-sarif-1.c: Move to...
* c-c++-common/analyzer/malloc-sarif-1.c: ...here.
* gcc.dg/analyzer/malloc-vs-local-1a.c: Move to...
* c-c++-common/analyzer/malloc-vs-local-1a.c: ...here.
* gcc.dg/analyzer/malloc-vs-local-1b.c: Move to...
* c-c++-common/analyzer/malloc-vs-local-1b.c: ...here.
* gcc.dg/analyzer/malloc-vs-local-2.c: Move to...
* c-c++-common/analyzer/malloc-vs-local-2.c: ...here.
* gcc.dg/analyzer/malloc-vs-local-3.c: Move to...
* c-c++-common/analyzer/malloc-vs-local-3.c: ...here.
* gcc.dg/analyzer/many-disabled-diagnostics.c: Move to...
* c-c++-common/analyzer/many-disabled-diagnostics.c: ...here.
* gcc.dg/analyzer/many-unused-locals.c: Move to...
* c-c++-common/analyzer/many-unused-locals.c: ...here.
* gcc.dg/analyzer/memcpy-pr107882.c: Move to...
* c-c++-common/analyzer/memcpy-pr107882.c: ...here.
* gcc.dg/analyzer/memset-1.c: Move to...
* c-c++-common/analyzer/memset-1.c: ...here.
* gcc.dg/analyzer/memset-2.c: Move to...
* c-c++-common/analyzer/memset-2.c: ...here.
* gcc.dg/analyzer/named-constants-via-macros-2.c: Move to...
* c-c++-common/analyzer/named-constants-via-macros-2.c: ...here.
* gcc.dg/analyzer/named-constants-via-macros-3.c: Move to...
* c-c++-common/analyzer/named-constants-via-macros-3.c: ...here.
* gcc.dg/analyzer/named-constants-via-macros-4.c: Move to...
* c-c++-common/analyzer/named-constants-via-macros-4.c: ...here.
* gcc.dg/analyzer/named-constants-via-macros-empty.c: Move to...
* c-c++-common/analyzer/named-constants-via-macros-empty.c: ...here.
* gcc.dg/analyzer/named-constants-via-macros-traditional.c: Move to...
* c-c++-common/analyzer/named-constants-via-macros-traditional.c:
...here.
* gcc.dg/analyzer/named-constants-via-macros-undef.c: Move to...
* c-c++-common/analyzer/named-constants-via-macros-undef.c: ...here.
* gcc.dg/analyzer/omp-parallel-for-1.c: Move to...
* c-c++-common/analyzer/omp-parallel-for-1.c: ...here.
* gcc.dg/analyzer/omp-parallel-for-get-min.c: Move to...
* c-c++-common/analyzer/omp-parallel-for-get-min.c: ...here.
* gcc.dg/analyzer/out-of-bounds-3.c: Move to...
* c-c++-common/analyzer/out-of-bounds-3.c: ...here.
* gcc.dg/analyzer/out-of-bounds-coreutils.c: Move to...
* c-c++-common/analyzer/out-of-bounds-coreutils.c: ...here.
* gcc.dg/analyzer/out-of-bounds-curl.c: Move to...
* c-c++-common/analyzer/out-of-bounds-curl.c: ...here.
* gcc.dg/analyzer/out-of-bounds-diagram-1-json.c: Move to...
* c-c++-common/analyzer/out-of-bounds-diagram-1-json.c: ...here.
* gcc.dg/analyzer/out-of-bounds-diagram-1-sarif.c: Move to...
* c-c++-common/analyzer/out-of-bounds-diagram-1-sarif.c: ...here.
* gcc.dg/analyzer/out-of-bounds-pr110387.c: Move to...
* c-c++-common/analyzer/out-of-bounds-pr110387.c: ...here.
* gcc.dg/analyzer/out-of-bounds-read-char-arr.c: Move to...
* c-c++-common/analyzer/out-of-bounds-read-char-arr.c: ...here.
* gcc.dg/analyzer/out-of-bounds-read-int-arr.c: Move to...
* c-c++-common/analyzer/out-of-bounds-read-int-arr.c: ...here.
* gcc.dg/analyzer/out-of-bounds-read-struct-arr.c: Move to...
* c-c++-common/analyzer/out-of-bounds-read-struct-arr.c: ...here.
* gcc.dg/analyzer/out-of-bounds-write-char-arr.c: Move to...
* c-c++-common/analyzer/out-of-bounds-write-char-arr.c: ...here.
* gcc.dg/analyzer/out-of-bounds-write-int-arr.c: Move to...
* c-c++-common/analyzer/out-of-bounds-write-int-arr.c: ...here.
* gcc.dg/analyzer/out-of-bounds-write-struct-arr.c: Move to...
* c-c++-common/analyzer/out-of-bounds-write-struct-arr.c: ...here.
* gcc.dg/analyzer/params-2.c: Move to...
* c-c++-common/analyzer/params-2.c: ...here.
* gcc.dg/analyzer/paths-1.c: Move to...
* c-c++-common/analyzer/paths-1.c: ...here.
* gcc.dg/analyzer/paths-1a.c: Move to...
* c-c++-common/analyzer/paths-1a.c: ...here.
* gcc.dg/analyzer/paths-2.c: Move to...
* c-c++-common/analyzer/paths-2.c: ...here.
* gcc.dg/analyzer/paths-3.c: Move to...
* c-c++-common/analyzer/paths-3.c: ...here.
* gcc.dg/analyzer/paths-4.c: Move to...
* c-c++-common/analyzer/paths-4.c: ...here.
* gcc.dg/analyzer/paths-5.c: Move to...
* c-c++-common/analyzer/paths-5.c: ...here.
* gcc.dg/analyzer/paths-6.c: Move to...
* c-c++-common/analyzer/paths-6.c: ...here.
* gcc.dg/analyzer/paths-7.c: Move to...
* c-c++-common/analyzer/paths-7.c: ...here.
* gcc.dg/analyzer/paths-8.c: Move to...
* c-c++-common/analyzer/paths-8.c: ...here.
* gcc.dg/analyzer/pattern-test-1.c: Move to...
* c-c++-common/analyzer/pattern-test-1.c: ...here.
* gcc.dg/analyzer/pipe-pr107486.c: Move to...
* c-c++-common/analyzer/pipe-pr107486.c: ...here.
* gcc.dg/analyzer/pointer-merging.c: Move to...
* c-c++-common/analyzer/pointer-merging.c: ...here.
* gcc.dg/analyzer/pr100546.c: Move to...
* c-c++-common/analyzer/pr100546.c: ...here.
* gcc.dg/analyzer/pr101503.c: Move to...
* c-c++-common/analyzer/pr101503.c: ...here.
* gcc.dg/analyzer/pr101570.c: Move to...
* c-c++-common/analyzer/pr101570.c: ...here.
* gcc.dg/analyzer/pr101721.c: Move to...
* c-c++-common/analyzer/pr101721.c: ...here.
* gcc.dg/analyzer/pr102692-2.c: Move to...
* c-c++-common/analyzer/pr102692-2.c: ...here.
* gcc.dg/analyzer/pr102695.c: Move to...
* c-c++-common/analyzer/pr102695.c: ...here.
* gcc.dg/analyzer/pr103217-3.c: Move to...
* c-c++-common/analyzer/pr103217-3.c: ...here.
* gcc.dg/analyzer/pr103217-4.c: Move to...
* c-c++-common/analyzer/pr103217-4.c: ...here.
* gcc.dg/analyzer/pr103217-5.c: Move to...
* c-c++-common/analyzer/pr103217-5.c: ...here.
* gcc.dg/analyzer/pr104089.c: Move to...
* c-c++-common/analyzer/pr104089.c: ...here.
* gcc.dg/analyzer/pr104308.c: Move to...
* c-c++-common/analyzer/pr104308.c: ...here.
* gcc.dg/analyzer/pr104452.c: Move to...
* c-c++-common/analyzer/pr104452.c: ...here.
* gcc.dg/analyzer/pr104524.c: Move to...
* c-c++-common/analyzer/pr104524.c: ...here.
* gcc.dg/analyzer/pr104560-2.c: Move to...
* c-c++-common/analyzer/pr104560-2.c: ...here.
* gcc.dg/analyzer/pr105087-1.c: Move to...
* c-c++-common/analyzer/pr105087-1.c: ...here.
* gcc.dg/analyzer/pr105087-2.c: Move to...
* c-c++-common/analyzer/pr105087-2.c: ...here.
* gcc.dg/analyzer/pr105252.c: Move to...
* c-c++-common/analyzer/pr105252.c: ...here.
* gcc.dg/analyzer/pr106394.c: Move to...
* c-c++-common/analyzer/pr106394.c: ...here.
* gcc.dg/analyzer/pr106539.c: Move to...
* c-c++-common/analyzer/pr106539.c: ...here.
* gcc.dg/analyzer/pr106845.c: Move to...
* c-c++-common/analyzer/pr106845.c: ...here.
* gcc.dg/analyzer/pr109439.c: Move to...
* c-c++-common/analyzer/pr109439.c: ...here.
* gcc.dg/analyzer/pr110455.c: Move to...
* c-c++-common/analyzer/pr110455.c: ...here.
* gcc.dg/analyzer/pr93032-mztools-simplified.c: Move to...
* c-c++-common/analyzer/pr93032-mztools-simplified.c: ...here.
* gcc.dg/analyzer/pr93290.c: Move to...
* c-c++-common/analyzer/pr93290.c: ...here.
* gcc.dg/analyzer/pr93352.c: Move to...
* c-c++-common/analyzer/pr93352.c: ...here.
* gcc.dg/analyzer/pr93355-localealias-feasibility-3.c: Move to...
* c-c++-common/analyzer/pr93355-localealias-feasibility-3.c: ...here.
* gcc.dg/analyzer/pr93355-localealias-simplified.c: Move to...
* c-c++-common/analyzer/pr93355-localealias-simplified.c: ...here.
* gcc.dg/analyzer/pr93546.c: Move to...
* c-c++-common/analyzer/pr93546.c: ...here.
* gcc.dg/analyzer/pr93547.c: Move to...
* c-c++-common/analyzer/pr93547.c: ...here.
* gcc.dg/analyzer/pr93669.c: Move to...
* c-c++-common/analyzer/pr93669.c: ...here.
* gcc.dg/analyzer/pr93938.c: Move to...
* c-c++-common/analyzer/pr93938.c: ...here.
* gcc.dg/analyzer/pr94047.c: Move to...
* c-c++-common/analyzer/pr94047.c: ...here.
* gcc.dg/analyzer/pr94099.c: Move to...
* c-c++-common/analyzer/pr94099.c: ...here.
* gcc.dg/analyzer/pr94105.c: Move to...
* c-c++-common/analyzer/pr94105.c: ...here.
* gcc.dg/analyzer/pr94362-2.c: Move to...
* c-c++-common/analyzer/pr94362-2.c: ...here.
* gcc.dg/analyzer/pr94399.c: Move to...
* c-c++-common/analyzer/pr94399.c: ...here.
* gcc.dg/analyzer/pr94447.c: Move to...
* c-c++-common/analyzer/pr94447.c: ...here.
* gcc.dg/analyzer/pr94639.c: Move to...
* c-c++-common/analyzer/pr94639.c: ...here.
* gcc.dg/analyzer/pr94640.c: Move to...
* c-c++-common/analyzer/pr94640.c: ...here.
* gcc.dg/analyzer/pr94732.c: Move to...
* c-c++-common/analyzer/pr94732.c: ...here.
* gcc.dg/analyzer/pr94851-1.c: Move to...
* c-c++-common/analyzer/pr94851-1.c: ...here.
* gcc.dg/analyzer/pr94851-2.c: Move to...
* c-c++-common/analyzer/pr94851-2.c: ...here.
* gcc.dg/analyzer/pr94851-3.c: Move to...
* c-c++-common/analyzer/pr94851-3.c: ...here.
* gcc.dg/analyzer/pr94851-4.c: Move to...
* c-c++-common/analyzer/pr94851-4.c: ...here.
* gcc.dg/analyzer/pr95026.c: Move to...
* c-c++-common/analyzer/pr95026.c: ...here.
* gcc.dg/analyzer/pr96598.c: Move to...
* c-c++-common/analyzer/pr96598.c: ...here.
* gcc.dg/analyzer/pr96611.c: Move to...
* c-c++-common/analyzer/pr96611.c: ...here.
* gcc.dg/analyzer/pr96644.c: Move to...
* c-c++-common/analyzer/pr96644.c: ...here.
* gcc.dg/analyzer/pr96646.c: Move to...
* c-c++-common/analyzer/pr96646.c: ...here.
* gcc.dg/analyzer/pr96648.c: Move to...
* c-c++-common/analyzer/pr96648.c: ...here.
* gcc.dg/analyzer/pr96650-1-notrans.c: Move to...
* c-c++-common/analyzer/pr96650-1-notrans.c: ...here.
* gcc.dg/analyzer/pr96650-1-trans.c: Move to...
* c-c++-common/analyzer/pr96650-1-trans.c: ...here.
* gcc.dg/analyzer/pr96650-2-notrans.c: Move to...
* c-c++-common/analyzer/pr96650-2-notrans.c: ...here.
* gcc.dg/analyzer/pr96650-2-trans.c: Move to...
* c-c++-common/analyzer/pr96650-2-trans.c: ...here.
* gcc.dg/analyzer/pr96651-1.c: Move to...
* c-c++-common/analyzer/pr96651-1.c: ...here.
* gcc.dg/analyzer/pr96699.c: Move to...
* c-c++-common/analyzer/pr96699.c: ...here.
* gcc.dg/analyzer/pr96705.c: Move to...
* c-c++-common/analyzer/pr96705.c: ...here.
* gcc.dg/analyzer/pr96713.c: Move to...
* c-c++-common/analyzer/pr96713.c: ...here.
* gcc.dg/analyzer/pr96764.c: Move to...
* c-c++-common/analyzer/pr96764.c: ...here.
* gcc.dg/analyzer/pr96777.c: Move to...
* c-c++-common/analyzer/pr96777.c: ...here.
* gcc.dg/analyzer/pr96860-2.c: Move to...
* c-c++-common/analyzer/pr96860-2.c: ...here.
* gcc.dg/analyzer/pr97029.c: Move to...
* c-c++-common/analyzer/pr97029.c: ...here.
* gcc.dg/analyzer/pr97072.c: Move to...
* c-c++-common/analyzer/pr97072.c: ...here.
* gcc.dg/analyzer/pr97130.c: Move to...
* c-c++-common/analyzer/pr97130.c: ...here.
* gcc.dg/analyzer/pr97233.c: Move to...
* c-c++-common/analyzer/pr97233.c: ...here.
* gcc.dg/analyzer/pr97514.c: Move to...
* c-c++-common/analyzer/pr97514.c: ...here.
* gcc.dg/analyzer/pr97608.c: Move to...
* c-c++-common/analyzer/pr97608.c: ...here.
* gcc.dg/analyzer/pr97668.c: Move to...
* c-c++-common/analyzer/pr97668.c: ...here.
* gcc.dg/analyzer/pr98073.c: Move to...
* c-c++-common/analyzer/pr98073.c: ...here.
* gcc.dg/analyzer/pr98575-1.c: Move to...
* c-c++-common/analyzer/pr98575-1.c: ...here.
* gcc.dg/analyzer/pr98580-a.c: Move to...
* c-c++-common/analyzer/pr98580-a.c: ...here.
* gcc.dg/analyzer/pr98580-b.c: Move to...
* c-c++-common/analyzer/pr98580-b.c: ...here.
* gcc.dg/analyzer/pr98918.c: Move to...
* c-c++-common/analyzer/pr98918.c: ...here.
* gcc.dg/analyzer/pr99044-2.c: Move to...
* c-c++-common/analyzer/pr99044-2.c: ...here.
* gcc.dg/analyzer/pr99716-2.c: Move to...
* c-c++-common/analyzer/pr99716-2.c: ...here.
* gcc.dg/analyzer/pr99716-3.c: Move to...
* c-c++-common/analyzer/pr99716-3.c: ...here.
* gcc.dg/analyzer/pr99906.c: Move to...
* c-c++-common/analyzer/pr99906.c: ...here.
* gcc.dg/analyzer/pragma-1.c: Move to...
* c-c++-common/analyzer/pragma-1.c: ...here.
* gcc.dg/analyzer/pragma-2.c: Move to...
* c-c++-common/analyzer/pragma-2.c: ...here.
* gcc.dg/analyzer/refcounting-1.c: Move to...
* c-c++-common/analyzer/refcounting-1.c: ...here.
* gcc.dg/analyzer/rhbz1878600.c: Move to...
* c-c++-common/analyzer/rhbz1878600.c: ...here.
* gcc.dg/analyzer/sarif-pr107366.c: Move to...
* c-c++-common/analyzer/sarif-pr107366.c: ...here.
* gcc.dg/analyzer/setjmp-pr109094.c: Move to...
* c-c++-common/analyzer/setjmp-pr109094.c: ...here.
* gcc.dg/analyzer/sock-2.c: Move to...
* c-c++-common/analyzer/sock-2.c: ...here.
* gcc.dg/analyzer/stale-frame-1.c: Move to...
* c-c++-common/analyzer/stale-frame-1.c: ...here.
* gcc.dg/analyzer/stdarg-sentinel-1.c: Move to...
* c-c++-common/analyzer/stdarg-sentinel-1.c: ...here.
* gcc.dg/analyzer/stdarg-types-2.c: Move to...
* c-c++-common/analyzer/stdarg-types-2.c: ...here.
* gcc.dg/analyzer/stdarg-types-3.c: Move to...
* c-c++-common/analyzer/stdarg-types-3.c: ...here.
* gcc.dg/analyzer/stdarg-types-4.c: Move to...
* c-c++-common/analyzer/stdarg-types-4.c: ...here.
* gcc.dg/analyzer/strcpy-2.c: Move to...
* c-c++-common/analyzer/strcpy-2.c: ...here.
* gcc.dg/analyzer/strndup-1.c: Move to...
* c-c++-common/analyzer/strndup-1.c: ...here.
* gcc.dg/analyzer/switch-wrong-enum.c: Move to...
* c-c++-common/analyzer/switch-wrong-enum.c: ...here.
* gcc.dg/analyzer/symbolic-1.c: Move to...
* c-c++-common/analyzer/symbolic-1.c: ...here.
* gcc.dg/analyzer/symbolic-2.c: Move to...
* c-c++-common/analyzer/symbolic-2.c: ...here.
* gcc.dg/analyzer/symbolic-3.c: Move to...
* c-c++-common/analyzer/symbolic-3.c: ...here.
* gcc.dg/analyzer/symbolic-4.c: Move to...
* c-c++-common/analyzer/symbolic-4.c: ...here.
* gcc.dg/analyzer/symbolic-5.c: Move to...
* c-c++-common/analyzer/symbolic-5.c: ...here.
* gcc.dg/analyzer/symbolic-6.c: Move to...
* c-c++-common/analyzer/symbolic-6.c: ...here.
* gcc.dg/analyzer/symbolic-7.c: Move to...
* c-c++-common/analyzer/symbolic-7.c: ...here.
* gcc.dg/analyzer/symbolic-8.c: Move to...
* c-c++-common/analyzer/symbolic-8.c: ...here.
* gcc.dg/analyzer/symbolic-gt-1.c: Move to...
* c-c++-common/analyzer/symbolic-gt-1.c: ...here.
* gcc.dg/analyzer/taint-alloc-3.c: Move to...
* c-c++-common/analyzer/taint-alloc-3.c: ...here.
* gcc.dg/analyzer/taint-assert-BUG_ON.c: Move to...
* c-c++-common/analyzer/taint-assert-BUG_ON.c: ...here.
* gcc.dg/analyzer/taint-divisor-2.c: Move to...
* c-c++-common/analyzer/taint-divisor-2.c: ...here.
* gcc.dg/analyzer/taint-merger.c: Move to...
* c-c++-common/analyzer/taint-merger.c: ...here.
* gcc.dg/analyzer/taint-realloc.c: Move to...
* c-c++-common/analyzer/taint-realloc.c: ...here.
* gcc.dg/analyzer/uninit-1.c: Move to...
* c-c++-common/analyzer/uninit-1.c: ...here.
* gcc.dg/analyzer/uninit-2.c: Move to...
* c-c++-common/analyzer/uninit-2.c: ...here.
* gcc.dg/analyzer/uninit-3.c: Move to...
* c-c++-common/analyzer/uninit-3.c: ...here.
* gcc.dg/analyzer/uninit-6.c: Move to...
* c-c++-common/analyzer/uninit-6.c: ...here.
* gcc.dg/analyzer/uninit-6b.c: Move to...
* c-c++-common/analyzer/uninit-6b.c: ...here.
* gcc.dg/analyzer/uninit-8.c: Move to...
* c-c++-common/analyzer/uninit-8.c: ...here.
* gcc.dg/analyzer/uninit-pr104576.c: Move to...
* c-c++-common/analyzer/uninit-pr104576.c: ...here.
* gcc.dg/analyzer/uninit-pr106204.c: Move to...
* c-c++-common/analyzer/uninit-pr106204.c: ...here.
* gcc.dg/analyzer/uninit-pr108704.c: Move to...
* c-c++-common/analyzer/uninit-pr108704.c: ...here.
* gcc.dg/analyzer/uninit-pr108806-qemu.c: Move to...
* c-c++-common/analyzer/uninit-pr108806-qemu.c: ...here.
* gcc.dg/analyzer/uninit-pr108968-register.c: Move to...
* c-c++-common/analyzer/uninit-pr108968-register.c: ...here.
* gcc.dg/analyzer/uninit-pr94713.c: Move to...
* c-c++-common/analyzer/uninit-pr94713.c: ...here.
* gcc.dg/analyzer/uninit-pr94714.c: Move to...
* c-c++-common/analyzer/uninit-pr94714.c: ...here.
* gcc.dg/analyzer/unknown-fns-2.c: Move to...
* c-c++-common/analyzer/unknown-fns-2.c: ...here.
* gcc.dg/analyzer/unknown-fns-3.c: Move to...
* c-c++-common/analyzer/unknown-fns-3.c: ...here.
* gcc.dg/analyzer/unknown-fns-4.c: Move to...
* c-c++-common/analyzer/unknown-fns-4.c: ...here.
* gcc.dg/analyzer/unused-local-1.c: Move to...
* c-c++-common/analyzer/unused-local-1.c: ...here.
* gcc.dg/analyzer/use-after-free-2.c: Move to...
* c-c++-common/analyzer/use-after-free-2.c: ...here.
* gcc.dg/analyzer/use-after-free-3.c: Move to...
* c-c++-common/analyzer/use-after-free-3.c: ...here.
* gcc.dg/analyzer/vsnprintf-1.c: Move to...
* c-c++-common/analyzer/vsnprintf-1.c: ...here.
* gcc.dg/analyzer/zlib-1.c: Move to...
* c-c++-common/analyzer/zlib-1.c: ...here.
* gcc.dg/analyzer/zlib-2.c: Move to...
* c-c++-common/analyzer/zlib-2.c: ...here.
* gcc.dg/analyzer/zlib-4.c: Move to...
* c-c++-common/analyzer/zlib-4.c: ...here.
* gcc.dg/analyzer/zlib-5.c: Move to...
* c-c++-common/analyzer/zlib-5.c: ...here.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
|