• R/O
  • HTTP
  • SSH
  • HTTPS

Liste der Commits

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GCC with patches for OS216


RSS
Rev. Zeit Autor
c6f2727 2020-07-01 04:11:59 Nathan Sidwell

A couple of function cloning tweaks

gcc/cp/
* class.c (copyfndecl_with_name): Drop inadvertent
DECL_CLONED_FUNCTION setting. Pass 0 for top_level to
rest_of_decl_compiulation.

67ef8cf 2020-07-01 03:52:01 David Edelsohn

rs6000: Fix gcc.target/powerpc testsuite target requirements.

gcc/testsuite/ChangeLog

2020-06-30 David Edelsohn <dje.gcc@gmail.com>

* gcc.target/powerpc/builtins-1-p9-runnable.c: Fix target requirements.
* gcc.target/powerpc/builtins-1.c: Same.
* gcc.target/powerpc/builtins-2-p9-runnable.c: Same.
* gcc.target/powerpc/builtins-2.c: Same.
* gcc.target/powerpc/builtins-3-p9-runnable.c: Same.
* gcc.target/powerpc/builtins-3-p9.c: Same.
* gcc.target/powerpc/builtins-3-runnable-p8.c: Same.
* gcc.target/powerpc/builtins-3.c: Same.
* gcc.target/powerpc/builtins-4-p9-runnable.c: Same.
* gcc.target/powerpc/builtins-4.c: Same.
* gcc.target/powerpc/builtins-5-p9-runnable.c: Same.
* gcc.target/powerpc/builtins-5.c: Same.
* gcc.target/powerpc/builtins-6-p9-runnable.c: Same.
* gcc.target/powerpc/builtins-6-runnable.c: Same.
* gcc.target/powerpc/builtins-7-p9-runnable.c: Same.
* gcc.target/powerpc/builtins-7-runnable.c: Same.
* gcc.target/powerpc/builtins-8-p9-runnable.c: Same.
* gcc.target/powerpc/builtins-8-runnable.c: Same.
* gcc.target/powerpc/cpu-builtin-1.c: Same.
* gcc.target/powerpc/float128-fma1.c: Same.
* gcc.target/powerpc/float128-hw.c: Same.
* gcc.target/powerpc/float128-hw10.c: Same.
* gcc.target/powerpc/float128-hw11.c: Same.
* gcc.target/powerpc/float128-hw2.c: Same.
* gcc.target/powerpc/float128-hw3.c: Same.
* gcc.target/powerpc/float128-hw4.c: Same.
* gcc.target/powerpc/float128-hw5.c: Same.
* gcc.target/powerpc/float128-hw6.c: Same.
* gcc.target/powerpc/float128-hw7.c: Same.
* gcc.target/powerpc/float128-hw8.c: Same.
* gcc.target/powerpc/float128-hw9.c: Same.
* gcc.target/powerpc/float128-minmax.c: Same.
* gcc.target/powerpc/float128-odd.c: Same.
* gcc.target/powerpc/float128-sqrt1.c: Same.

aa0868f 2020-07-01 03:46:44 Harald Anlauf

PR fortran/95978 - ICE in gfc_match_data, at fortran/decl.c:731

Catch NULL pointer dereference on invalid DATA statement.

gcc/fortran/
PR fortran/95978
* decl.c (gfc_match_data): Avoid NULL pointer dereference.

(cherry picked from commit 583812c2e2f3593823622b0a5821d957c832dbd0)

5d8ee8e 2020-07-01 03:44:47 Harald Anlauf

PR fortran/71706 - ICE on using sync images with -fcheck=bounds

The run-time checking code did not properly convert the kind of the
argument to SYNC IMAGES, leading to an error in verify_gimple. Fix that.

gcc/fortran/
PR fortran/71706
* trans-stmt.c (gfc_trans_sync): Do proper kind conversion in
bounds-checking code.

(cherry picked from commit e6cc67f6616c96f3e18a434e0c74ba2f3818cb6d)

cc3ae9f 2020-07-01 02:50:05 Nathan Sidwell

c++: Tweak function cloning names

On the modules branch I need to expose an intermediate step of the
function cloning, but before that it'd be nice to rationalize the
names somewhat, now that we also use that API for copying the equality
operator. Jason's recent patch caused me some pain by altering the
same code. I can only blame myself for not pushing some bits sooner.
Anyway, this patch makes the newly renamed copy_fndecl_with_name
static, and adds a wrapper copy_operator_fn, that takes an operator
code. The cdtor cloning functions are renamed to explicitly note they
expect cdtors. A followup patch will move some of the logic from
copy_fndecl_with_name to build_cdtor_clones.

gcc/cp/
* cp-tree.h (copy_fndecl_with_name): Rename to ...
(copy_operatorn_fn): ... this. Change arg type.
(clone_function_decl): Rename to ...
(clone_cdtor): ... this.
* class.c (copy_fndecl_with_name): Make static.
(copy_operator_fn): New wrapper.
(build_clones): Rename to ...
(build_cdtor_clones): ... this.
(clone_function_decl): Rename to ...
(clone_cdtor): ... this. Adjust build_clones calls.
(clone_constructors_and_destructors): Adjust clone_function_decl
calls.
* method.c (implicitly_declare_fn): Adjust copy_fndecl_with_name
call.
(lazily_declare_fn): Adjust clone_function_decl call.
* pt.c (tsubst_function_decl): Likewise.
(instantiate_template_1): Likewise.

libcc1/
* libcp1plugin.cc (plugin_build_decl): Adjust clone_function_decl
call.

fe03543 2020-07-01 02:44:26 David Edelsohn

testsuite: expect additional warning in analyzer/pr93993.f90

The recent changes to warnings elicit an additional warning in
analyzer/pr93993.f90. This patch updates the testcase to expect the warning.

gcc/testsuite/ChangeLog

2020-06-30 David Edelsohn <dje.gcc@gmail.com>

* gfortran.dg/analyzer/pr93993.f90: Expect leak tm warning.

fb0bb1c 2020-07-01 02:22:36 Nathan Sidwell

Internal api tweak

gcc/cp/
* class.c (copy_fndecl_with_name): Add tree code parm. Adjust
callers.

dd50d60 2020-07-01 01:38:53 Nathan Sidwell

Missed a rename

libcc1/
* libcp1plugin.cc (plugin_build_decl): Adjust.

e581e61 2020-07-01 01:16:50 Iain Sandoe

Merge master r11-1733.

* Merge master r11-1733-geef63aacb255.

84d3a3a 2020-07-01 00:59:44 Nathan Sidwell

Unify copy_fndecl_with_name and clone_decls.

gcc/cp/
* class.c (DECL_NEEDS_VTT_PARM_P): Delete.
(copy_fndecl_with_name): Add ctor booleans, use them. Make static.
(copy_operator_fn): New wrapper.
(build_clone): Adjust to use copy_fndecl_with_name.
(build_clones): Rename to ...
(build_cdtor_clones): ... here.
(clone_function_decl): Rename to ...
(clone_cdtor): ... here.
(clone_constructors_and_destructors): Adjust.
* cp-tree.h (build_clones): Rename to build_cdtor_clones.
(clone_function_decl): Rename to clone_cdtor.
(copy_fndecl_with_name): Rename to copy_operator_fn. Change arg
type.
* method.c (implicitly_declare_fn): Adjust.
(lazily_declare_fn): Likewise.
* module.c (trees_in::decl_value): Adjust.
* pt.c (tsubst_function_Decl, instantiate_template_1): Adjust.

4b185ee 2020-07-01 00:50:59 Thomas Schwinge

Mark up unreachable OpenACC 'attach' code path

... introduced in commit 8e7e71ff247fb116dc381c5ef0c09acc0d2b374f (r279625)
"OpenACC 2.6 deep copy: libgomp parts".

libgomp/
* target.c (gomp_map_vars_existing): Assert 'kind !=
GOMP_MAP_ATTACH'.
(gomp_map_vars_internal): Clean up.

(cherry picked from commit aff43ac0aed5185884724adbdfd4dbbabd87637c)

01dd586 2020-07-01 00:48:36 Thomas Schwinge

[testsuite] Adjust 'scoff' for HSA offloading

Fix-up for commit efc16503ca10bc0e934e0bace5777500e4dc757a "handle dumpbase in
offloading, adjust testsuite".

gcc/testsuite/
* lib/scanoffload.exp (scoff) <offload_targets>: Skip HSA.

8a8efad 2020-07-01 00:48:36 Thomas Schwinge

[testsuite] Replace fragile 'scan-assembler' with 'scan-offload-rtl' in 'libgomp.oacc-c-c++-common/pr85381*.c'

These test cases use directives similar to:

/* { dg-additional-options "-save-temps" } */

/* { dg-final { scan-assembler-times "bar.sync" 2 } } */

This expects to scan the PTX offloading compilation assembler code (not host
code!), expecting that nvptx offloading code assembly is produced after the
host code, and thus overwrites the latter file. (Yes, that's certainly
ugly/fragile...)

..., and this broke with recent commit 1dedc12d186a110854537e1279b4e6c29f2df35a
"revamp dump and aux output names" plus fix-up commit commit
efc16503ca10bc0e934e0bace5777500e4dc757a "handle dumpbase in offloading, adjust
testsuite" (short summary: file names changed), so let's finally make that
robust.

libgomp/
* testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: Replace fragile
'scan-assembler' with 'scan-offload-rtl'.
* testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/pr85381.c: Likewise.

aff43ac 2020-07-01 00:48:36 Thomas Schwinge

Mark up unreachable OpenACC 'attach' code path

... introduced in commit 8e7e71ff247fb116dc381c5ef0c09acc0d2b374f (r279625)
"OpenACC 2.6 deep copy: libgomp parts".

libgomp/
* target.c (gomp_map_vars_existing): Assert 'kind !=
GOMP_MAP_ATTACH'.
(gomp_map_vars_internal): Clean up.

e2c17dc 2020-07-01 00:45:36 Martin Liska

gcc-changelog: support older GitPython releases.

contrib/ChangeLog:

* gcc-changelog/git_repository.py: Support older releases of
GitPython when renamed_file was named renamed.

eef63aa 2020-07-01 00:32:39 Iain Sandoe

coroutines: Fix a diagnostic trailing space warning.

A recently add diagnostic has a trailing space.
Fixed thus.

gcc/cp/ChangeLog:

* coroutines.cc (morph_fn_to_coro): Remove trailing
space in a diagnostic.

3c3b422 2020-06-30 23:20:28 Christophe Lyon

arm: Warn if IRQ handler is not compiled with -mgeneral-regs-only [PR target/94743]

The interrupt attribute does not guarantee that the FP registers are
saved, which can result in problems difficult to debug.

Saving the FP registers and status registers can be a large penalty,
so it's probably not desirable to do that all the time.

If the handler calls other functions, we'd likely need to save all of
them, for lack of knowledge of which registers they actually clobber.

This is even more obscure for the end-user when the compiler inserts
calls to helper functions such as memcpy (some multilibs do use FP
registers to speed it up).

In the PR, we discussed adding routines in libgcc to save the FP
context and saving only locally-clobbered FP registers, but this seems
to be too much work for the purpose, given that in general such
handlers try to avoid this kind of penalty.
I suspect we would also want new attributes to instruct the compiler
that saving the FP context is not needed.

In the mean time, emit a warning to suggest re-compiling with
-mgeneral-regs-only. Note that this can lead to errors if the code
uses floating-point and -mfloat-abi=hard, eg:
argument of type 'double' not permitted with -mgeneral-regs-only

This can be troublesome for the user, but at least this would make
him aware of the latent issue.

The patch adds several testcases:

- pr94734-1-hard.c checks that a warning is emitted when using
-mfloat-abi=hard. Function IRQ_HDLR_Test can make implicit calls to
runtime floating-point routines (or direct use of FP instructions),
IRQ_HDLR_Test2 doesn't. We emit a warning in both cases, though.

- pr94734-1-softfp.c: same as above wih -mfloat-abi=softfp.

- pr94734-1-soft.c checks that no warning is emitted when using
-mfloat-abi=soft when the same code as above.

- pr94734-2.c checks that no warning is emitted when using
-mgeneral-regs-only.

- pr94734-3.c checks that no warning is emitted when using
-mgeneral-regs-only even using float-point data.

2020-06-30 Christophe Lyon <christophe.lyon@linaro.org>

PR target/94743
gcc/
* config/arm/arm.c (arm_handle_isr_attribute): Warn if
-mgeneral-regs-only is not used.

gcc/testsuite/
* gcc.misc-tests/arm-isr.c: Add -mgeneral-regs-only.
* gcc.target/arm/empty_fiq_handler.c: Add -mgeneral-regs-only.
* gcc.target/arm/interrupt-1.c: Add -mgeneral-regs-only.
* gcc.target/arm/interrupt-2.c: Add -mgeneral-regs-only.
* gcc.target/arm/pr70830.c: Add -mgeneral-regs-only.
* gcc.target/arm/pr94743-1-hard.c: New test.
* gcc.target/arm/pr94743-1-soft.c: New test.
* gcc.target/arm/pr94743-1-softfp.c: New test.
* gcc.target/arm/pr94743-2.c: New test.
* gcc.target/arm/pr94743-3.c: New test.

4ff0022 2020-06-30 23:02:44 Alex Coplan

arm: Don't generate invalid LDRD insns

This fixes a bug in the arm backend where GCC generates invalid LDRD
instructions. The LDRD instruction requires the first transfer register to be
even, but GCC attempts to use odd registers here. For example, with the
following C code:

struct c {
double a;
} __attribute((aligned)) __attribute((packed));
struct c d;
struct c f(struct c);
void e() { f(d); }

The struct d is passed in registers r1 and r2 to the function f, and GCC
attempted to do this with a LDRD instruction when compiling with -march=armv7-a
on a soft float toolchain.

The fix is analogous to the corresponding one for STRD in the same function:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=52057dc4ac5295caebf83147f688d769c93cbc8d

gcc/:
* config/arm/arm.c (output_move_double): Fix codegen when loading into
a register pair with an odd base register.

gcc/testsuite/:
* gcc.c-torture/compile/packed-aligned-1.c: New test.
* gcc.c-torture/execute/packed-aligned.c: New test.

(cherry picked from commit 8b8f3117263ca79b3febadadb07732588d99d5f6)

1b9f2e4 2020-06-30 22:59:36 Alex Coplan

arm: Don't generate invalid LDRD insns

This fixes a bug in the arm backend where GCC generates invalid LDRD
instructions. The LDRD instruction requires the first transfer register to be
even, but GCC attempts to use odd registers here. For example, with the
following C code:

struct c {
double a;
} __attribute((aligned)) __attribute((packed));
struct c d;
struct c f(struct c);
void e() { f(d); }

The struct d is passed in registers r1 and r2 to the function f, and GCC
attempted to do this with a LDRD instruction when compiling with -march=armv7-a
on a soft float toolchain.

The fix is analogous to the corresponding one for STRD in the same function:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=52057dc4ac5295caebf83147f688d769c93cbc8d

gcc/:
* config/arm/arm.c (output_move_double): Fix codegen when loading into
a register pair with an odd base register.

gcc/testsuite/:
* gcc.c-torture/compile/packed-aligned-1.c: New test.
* gcc.c-torture/execute/packed-aligned.c: New test.

(cherry picked from commit 8b8f3117263ca79b3febadadb07732588d99d5f6)

33d114f 2020-06-30 22:54:07 Yang Yang

tree-optimization/95855 - Add checks to avoid spoiling if-conversion if

Add some checks in pass_splits_paths, so that pass_split_paths can
recognize the missed if-conversion opportunity and do not duplicate the
corresponding block.

2020-06-30 Yang Yang <yangyang305@huawei.com>

gcc/ChangeLog:

PR tree-optimization/95855
* gimple-ssa-split-paths.c (is_feasible_trace): Add extra
checks to recognize a missed if-conversion opportunity when
judging whether to duplicate a block.

gcc/testsuite/ChangeLog

PR tree-optimization/95855
* gcc.dg/tree-ssa/split-path-12.c: New testcase.

c32074f 2020-06-30 22:29:34 Alex Coplan

arm: Don't generate invalid LDRD insns

This fixes a bug in the arm backend where GCC generates invalid LDRD
instructions. The LDRD instruction requires the first transfer register to be
even, but GCC attempts to use odd registers here. For example, with the
following C code:

struct c {
double a;
} __attribute((aligned)) __attribute((packed));
struct c d;
struct c f(struct c);
void e() { f(d); }

The struct d is passed in registers r1 and r2 to the function f, and GCC
attempted to do this with a LDRD instruction when compiling with -march=armv7-a
on a soft float toolchain.

The fix is analogous to the corresponding one for STRD in the same function:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=52057dc4ac5295caebf83147f688d769c93cbc8d

gcc/:
* config/arm/arm.c (output_move_double): Fix codegen when loading into
a register pair with an odd base register.

gcc/testsuite/:
* gcc.c-torture/compile/packed-aligned-1.c: New test.
* gcc.c-torture/execute/packed-aligned.c: New test.

(cherry picked from commit 8b8f3117263ca79b3febadadb07732588d99d5f6)

dc0a568 2020-06-30 22:04:55 Thomas Koenig

Do not generate recursion check for compiler-generated procedures.

This one-line fix removes a check for recursion for procedures
which are compiler-generated, such as finalizers or deallocation.
These need to be recursive, even if the user code should not be.

gcc/fortran/ChangeLog:

PR fortran/95743
* trans-decl.c (gfc_generate_function_code): Do not generate
recursion check for compiler-generated procedures.

(cherry picked from commit 95cdcf701dad826f225d6413b59650f181954399)

6e1d5e7 2020-06-30 22:03:34 Thomas Koenig

Do not generate recursion check for compiler-generated procedures.

This one-line fix removes a check for recursion for procedures
which are compiler-generated, such as finalizers or deallocation.
These need to be recursive, even if the user code should not be.

gcc/fortran/ChangeLog:

PR fortran/95743
* trans-decl.c (gfc_generate_function_code): Do not generate
recursion check for compiler-generated procedures.

(cherry picked from commit 95cdcf701dad826f225d6413b59650f181954399)

7d503e3 2020-06-30 21:58:27 David Edelsohn

testsuite: fix constexpr-is_literal.C deprecated c++17 and above.

std::is_literal_type is deprecated in C++17 and above.

This was introduced in c++11, but the testsuite list of standards now only
includes c++98 and c++14. This patch limits the test to c++14_only to
prevent deprecation warnings.

gcc/testsuite/ChangeLog

2020-06-30 David Edelsohn <dje.gcc@gmail.com>

* g++.dg/cpp0x/constexpr-is_literal.C: Limit test to -std=c++14.

65025a6 2020-06-30 21:46:13 Iain Sandoe

coroutines: Handle namespaces while scanning local vars [PR95711].

We need to skip past namespace decls when scanning the bind
expression var lists checking for local vars.

gcc/cp/ChangeLog:

PR c++/95711
* coroutines.cc (register_local_var_uses): Skip past
namespace decls.

gcc/testsuite/ChangeLog:

PR c++/95711
* g++.dg/coroutines/pr95711.C: New test.

(cherry picked from commit 06ed4aae1c2fa84b7050a286d866db4a6def3c36)

c5a90f6 2020-06-30 21:46:13 Iain Sandoe

coroutines: Handle awaiters that are sub-objects [PR95736]

Move deciding on initializers for awaitables to the build of the
co_await, this allows us to analyse cases that do not need
a temporary at that point.

As the PR shows, the late analysis meant that we were not
checking properly for the case that an awaiter is a sub-object
of an existing variable outside the current function scope (and
therefore does not need to be duplicated in the frame).

gcc/cp/ChangeLog:

PR c++/95736
* coroutines.cc (get_awaitable_var): New helper.
(build_co_await): Check more carefully before
copying an awaitable.
(expand_one_await_expression): No initializer
is required when the awaitable is not a temp.
(register_awaits): Remove handling that is now
completed when the await expression is built.

gcc/testsuite/ChangeLog:

PR c++/95736
* g++.dg/coroutines/pr95736.C: New test.

(cherry picked from commit daaed0199ee57013ae011421a7e90b7bdd295373)

289437a 2020-06-30 21:46:13 Iain Sandoe

coroutines: Improve diagnostics for one allocator case.

If the user provides operator new and that is noexcept, this
implies that it can fail with a null return. At that point, we expect
to be able to call get_return_object_on_allocation_failure().

This diagnoses the case where such an operator new has been
provided, but the g-r-o-o-a-f is either missing or unusable.

gcc/cp/ChangeLog:

* coroutines.cc (morph_fn_to_coro): Diagnose unavailable
get_return_object_on_allocation_failure.

gcc/testsuite/ChangeLog:

* g++.dg/coroutines/coro-bad-grooaf-01-grooaf-expected.C: New test.

(cherry picked from commit 9c5ca11a33fa91345fe813d449ddc4a821fc72d5)

5958b92 2020-06-30 20:10:20 Thomas Koenig

Use CHARACTER(kind) string for calculating the type hash.

This regression came about because of a change in the way
types are displayed in error messages. The character
representation is also used to calculate the hashes for
our types, so this patch restores the old behavior if
we are indeed calculating a hash.

The test case also checks for the specific hash value because
changing that would be an ABI change, which we should not
be doing unintentionally.

gcc/fortran/ChangeLog:

2020-06-30 Thomas Koenig <tkoenig@gcc.gnu.org>

PR fortran/95355
* gfortran.h (gfc_typename): Add optional argument for_hash.
* misc.c (gfc_typename): When for_hash is true, just retur
CHARACTER(kind).
* class.c (gfc_intrinsic_hash_value): Call gfc_typename with
for_hash = true.

8dc933c 2020-06-30 18:42:54 Jakub Jelinek

c-family: Avoid ICEs on calls to internal functions [PR95963]

The following testcase ICEs since recent Martin's -Wnonnull changes,
we see a CALL_EXPR and ICE because CALL_EXPR_FN is NULL, which is
valid for internal function calls. Internal function calls don't have a
function type, and will never have format_arg attribute on them nor will
serve as the i18n routines -Wformat cares about.

2020-06-30 Jakub Jelinek <jakub@redhat.com>

PR c++/95963
* c-common.c (check_function_arguments_recurse): Don't crash on
calls to internal functions.

* g++.dg/cpp1z/launder9.C: New test.

c49ed50 2020-06-30 18:04:17 GCC Administrator

Daily bump.