]> gcc.gnu.org Git - gcc.git/log
gcc.git
4 years agoRevert "PR fortran/95689 - ICE in check_sym_interfaces, at fortran/interface.c:2015"
Harald Anlauf [Wed, 24 Jun 2020 20:44:11 +0000 (22:44 +0200)]
Revert "PR fortran/95689 - ICE in check_sym_interfaces, at fortran/interface.c:2015"

With submodules, name mangling of interfaces may result in long internal
symbols overflowing an internal buffer.  We now check that we do not
exceed the enlarged buffer size.

gcc/fortran/
PR fortran/95689
* interface.c (check_sym_interfaces): Enlarge temporary buffer,
and add check on length on mangled name to prevent overflow.

gcc/testsuite/
PR fortran/95689
* gfortran.dg/pr95689.f90: New test.

(reverts the cherry-pick from commit 62c0c0ea7bfb6f8f6b8d767b05120cafb6823da6)

4 years agolibstdc++: Fix std::from_chars to ignore leading zeros in base 2
Jonathan Wakely [Wed, 24 Jun 2020 10:45:01 +0000 (11:45 +0100)]
libstdc++: Fix std::from_chars to ignore leading zeros in base 2

The parser for binary numbers returned an error if the entire string
contains more digits than the result type. Leading zeros should be
ignored.

libstdc++-v3/ChangeLog:

* include/std/charconv (__from_chars_binary): Ignore leading zeros.
* testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
not just 10 and 16.
* testsuite/20_util/from_chars/3.cc: New test.

(cherry picked from commit eb0ff770e29715deb8b2e6f5da736e0c1e8f8d07)

4 years agoDaily bump.
GCC Administrator [Wed, 24 Jun 2020 00:18:18 +0000 (00:18 +0000)]
Daily bump.

4 years agoPR fortran/95689 - ICE in check_sym_interfaces, at fortran/interface.c:2015
Harald Anlauf [Sat, 20 Jun 2020 14:09:45 +0000 (16:09 +0200)]
PR fortran/95689 - ICE in check_sym_interfaces, at fortran/interface.c:2015

With submodules, name mangling of interfaces may result in long internal
symbols overflowing an internal buffer.  We now check that we do not
exceed the enlarged buffer size.

gcc/fortran/
PR fortran/95689
* interface.c (check_sym_interfaces): Enlarge temporary buffer,
and add check on length on mangled name to prevent overflow.

(cherry picked from commit 62c0c0ea7bfb6f8f6b8d767b05120cafb6823da6)

4 years agoPR fortran/95587 - ICE in gfc_target_encode_expr, at fortran/target-memory.c:362
Harald Anlauf [Sat, 20 Jun 2020 14:05:13 +0000 (16:05 +0200)]
PR fortran/95587 - ICE in gfc_target_encode_expr, at fortran/target-memory.c:362

EQUIVALENCE objects are subject to constraints listed in the Fortran 2018
standard, section 8.10.1.1.  These constraints are to be checked
also for CLASS variables.

gcc/fortran/
PR fortran/95587
* match.c (gfc_match_equivalence): Check constraints on
EQUIVALENCE objects also for CLASS variables.

(cherry picked from commit 5eb947601bdce59f2ff26694327ad173c51c2724)

4 years agoFix memory corruption with vector and variant record
Eric Botcazou [Tue, 23 Jun 2020 16:33:28 +0000 (18:33 +0200)]
Fix memory corruption with vector and variant record

The problem is that Has_Constrained_Partial_View must be tested on the
base type of the designated type of an allocator.

gcc/ada/ChangeLog:
* gcc-interface/trans.c (gnat_to_gnu) <N_Allocator>: Minor tweaks.
Call Has_Constrained_Partial_View on base type of designated type.

4 years agoFortran : ICE in resolve_fl_procedure PR95708
Mark Eggleston [Mon, 22 Jun 2020 12:35:01 +0000 (13:35 +0100)]
Fortran  : ICE in resolve_fl_procedure PR95708

Now issues an error "Intrinsic procedure 'num_images' not
allowed in PROCEDURE" instead of an ICE.

2020-06-22  Steven G. Kargl  <kargl@gcc.gnu.org>

gcc/fortran/

PR fortran/95708
* intrinsic.c (add_functions): Replace CLASS_INQUIRY with
CLASS_TRANSFORMATIONAL for intrinsic num_images.
(make_generic): Replace ACTUAL_NO with ACTUAL_YES for
intrinsic team_number.
* resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
exists before using it.

2020-06-22  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

PR fortran/95708
* gfortran.dg/pr95708.f90: New test.

(cherry picked from commit 647340c92a042e8e6f7d004637f07060dbde49c0)

4 years agoDaily bump.
GCC Administrator [Tue, 23 Jun 2020 00:18:04 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Mon, 22 Jun 2020 00:18:16 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 21 Jun 2020 00:18:05 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 20 Jun 2020 00:18:03 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Fri, 19 Jun 2020 00:18:21 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Thu, 18 Jun 2020 00:18:27 +0000 (00:18 +0000)]
Daily bump.

4 years agohurd: libgcc unwinding support over signal trampolines
Samuel Thibault [Fri, 29 May 2020 11:46:50 +0000 (13:46 +0200)]
hurd: libgcc unwinding support over signal trampolines

libgcc/
* config.host (md_unwind_header) <i[34567]86-*-gnu*>: Set to
'i386/gnu-unwind.h'
* config/i386/gnu-unwind.h: New file.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
(cherry picked from commit 5e2eebc80d6eeca24745c27a925afdb64292ed22)

4 years ago[HSA] Avoid ICE when "HSA does not implement indirect calls"
Thomas Schwinge [Sat, 6 Jun 2020 16:44:34 +0000 (18:44 +0200)]
[HSA] Avoid ICE when "HSA does not implement indirect calls"

Made apparent by recent commit dc703151d4f4560e647649506d5b4ceb0ee11e90
"openmp: Implement discovery of implicit declare target to clauses":

    +FAIL: libgomp.c/target-39.c (internal compiler error)
    +FAIL: libgomp.c/target-39.c (test for excess errors)
    +UNRESOLVED: libgomp.c/target-39.c compilation failed to produce executable

This is in a '--enable-offload-targets=[...],hsa' build, with '-foffload=hsa'
enabled (by default).

    during GIMPLE pass: hsagen
    source-gcc/libgomp/testsuite/libgomp.c/target-39.c: In function ‘main._omp_fn.0.hsa.0’:
    source-gcc/libgomp/testsuite/libgomp.c/target-39.c:23:11: internal compiler error: Segmentation fault
       23 |   #pragma omp target map(from:err)
          |           ^~~
    [...]

GDB:

    Program received signal SIGSEGV, Segmentation fault.
    fndecl_built_in_p (node=0x0, name=BUILT_IN_PREFETCH) at [...]/source-gcc/gcc/tree.h:6267
    6267      return (fndecl_built_in_p (node, BUILT_IN_NORMAL)
    (gdb) bt
    #0  fndecl_built_in_p (node=0x0, name=BUILT_IN_PREFETCH) at [...]/source-gcc/gcc/tree.h:6267
    #1  0x0000000000b19739 in gen_hsa_insns_for_call (stmt=stmt@entry=0x7ffff693b200, hbb=hbb@entry=0x2b152c0) at [...]/source-gcc/gcc/hsa-gen.c:5304
    #2  0x0000000000b1aca7 in gen_hsa_insns_for_gimple_stmt (stmt=0x7ffff693b200, hbb=hbb@entry=0x2b152c0) at [...]/source-gcc/gcc/hsa-gen.c:5770
    #3  0x0000000000b1bd21 in gen_body_from_gimple () at [...]/source-gcc/gcc/hsa-gen.c:5999
    #4  0x0000000000b1dbd2 in generate_hsa (kernel=<optimized out>) at [...]/source-gcc/gcc/hsa-gen.c:6596
    #5  0x0000000000b1de66 in (anonymous namespace)::pass_gen_hsail::execute (this=0x2a2aac0) at [...]/source-gcc/gcc/hsa-gen.c:6680
    #6  0x0000000000d06f90 in execute_one_pass (pass=pass@entry=0x2a2aac0) at [...]/source-gcc/gcc/passes.c:2502
    [...]
    (gdb) up
    #1  0x0000000000b19739 in gen_hsa_insns_for_call (stmt=stmt@entry=0x7ffff693b200, hbb=hbb@entry=0x2b152c0) at /home/thomas/tmp/source/gcc/build/track-slim-omp/source-gcc/gcc/hsa-gen.c:5304
    5304          if (fndecl_built_in_p (function_decl, BUILT_IN_PREFETCH))
    (gdb) print function_decl
    $1 = (tree) 0x0
    (gdb) list
    5299      if (!gimple_call_builtin_p (stmt, BUILT_IN_NORMAL))
    5300        {
    5301          tree function_decl = gimple_call_fndecl (stmt);
    5302          /* Prefetch pass can create type-mismatching prefetch builtin calls which
    5303             fail the gimple_call_builtin_p test above.  Handle them here.  */
    5304          if (fndecl_built_in_p (function_decl, BUILT_IN_PREFETCH))
    5305            return;
    5306
    5307          if (function_decl == NULL_TREE)
    5308            {

The problem is present already since 2016-11-23 commit
56b1c60e412fcf1245b4780871553cbdebb956a3 (r242761) "Merge from HSA branch to
trunk", and the fix obvious enough.

gcc/
* hsa-gen.c (gen_hsa_insns_for_call): Move 'function_decl ==
NULL_TREE' check earlier.
gcc/testsuite/
* c-c++-common/gomp/hsa-indirect-call-1.c: New file.

(cherry picked from commit 973bce0fb50bbfd91f47238b82b99935525716ad)

4 years agoDaily bump.
GCC Administrator [Wed, 17 Jun 2020 00:18:14 +0000 (00:18 +0000)]
Daily bump.

4 years agoc++: zero_init_expr_p of dependent expression [PR95678]
Patrick Palka [Tue, 16 Jun 2020 16:16:02 +0000 (12:16 -0400)]
c++: zero_init_expr_p of dependent expression [PR95678]

gcc/cp/ChangeLog:

PR c++/95678
* tree.c (zero_init_expr_p): Use uses_template_parms instead of
dependent_type_p.

gcc/testsuite/ChangeLog:

PR c++/95678
* g++.dg/cpp0x/dependent3.C: New test.

(cherry picked from commit 9a453da5cac7b6610cd342a7bea256acba5e61e1)

4 years agoDaily bump.
GCC Administrator [Tue, 16 Jun 2020 00:18:11 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Mon, 15 Jun 2020 00:17:59 +0000 (00:17 +0000)]
Daily bump.

4 years agoPR fortran/95503 - Fix ICE in gfc_is_simply_contiguous, at fortran/expr.c:5844
Harald Anlauf [Thu, 11 Jun 2020 13:48:56 +0000 (15:48 +0200)]
PR fortran/95503 - Fix ICE in gfc_is_simply_contiguous, at fortran/expr.c:5844

The check for assigning a pointer that cannot be determined to be simply
contiguous at compile time to a contiguous pointer does not need to be
invoked if the lhs of the assignment is known to have conflicting attributes.

2020-06-11  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95503
* expr.c (gfc_check_pointer_assign): Skip contiguity check of rhs
of pointer assignment if lhs cannot be simply contiguous.

gcc/testsuite/
PR fortran/95503
* gfortran.dg/pr95503.f90: New test.

(cherry picked from commit 87af4f40453a9c84363bde5d9a58466de7fbee2e)

4 years agoWhen avoiding double deallocation, look at namespace, expression and component.
Thomas Koenig [Sun, 14 Jun 2020 11:50:48 +0000 (13:50 +0200)]
When avoiding double deallocation, look at namespace, expression and component.

Our finalization handling is a mess.  Really, we should get to try and get
this fixed for gcc 11.

In the meantime, here is a patch which fixes a regression I introduced
when fixing a regression with a memory leak.  The important thing
here is to realize that we do not need to finalize (and deallocate)
multiple times for the same expression and the same component
in the same namespace.  It might cause code size regressions, but
better big code than wrong code...

Backported from r11-1296-g1af22e455584ef5fcad2b4474c1efc3fd26f6cb3 .

gcc/fortran/ChangeLog:

PR fortran/94109
* class.c (finalize_component): Return early if finalization has
already happened for expression and component within namespace.
* gfortran.h (gfc_was_finalized): New type.
(gfc_namespace): Add member was_finalzed.
(gfc_expr): Remove finalized.
* symbol.c (gfc_free_namespace): Free was_finalized.

gcc/testsuite/ChangeLog:

PR fortran/94109
* gfortran.dg/finalize_34.f90: Adjust free counts.
* gfortran.dg/finalize_36.f90: New test.

4 years agoDaily bump.
GCC Administrator [Sun, 14 Jun 2020 00:18:00 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 13 Jun 2020 00:18:12 +0000 (00:18 +0000)]
Daily bump.

4 years agogo.test: update issue4085b.go to version from Go 1.13
Ian Lance Taylor [Fri, 12 Jun 2020 21:00:11 +0000 (14:00 -0700)]
go.test: update issue4085b.go to version from Go 1.13

This lets the test pass on AIX.

Not updating to master because we get slightly different error messages,
so that is a more complex change.

4 years agoasan: fix RTX emission for ilp32
Martin Liska [Thu, 11 Jun 2020 07:34:41 +0000 (09:34 +0200)]
asan: fix RTX emission for ilp32

gcc/ChangeLog:

PR sanitizer/95634
* asan.c (asan_emit_stack_protection): Fix emission for ilp32
by using Pmode instead of ptr_mode.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
(cherry picked from commit 8cff672cb9a132d3d3158c2edfc9a64b55292b80)

4 years agoAdd missing store in emission of asan_stack_free.
Martin Liska [Tue, 19 May 2020 14:57:56 +0000 (16:57 +0200)]
Add missing store in emission of asan_stack_free.

gcc/ChangeLog:

2020-05-19  Martin Liska  <mliska@suse.cz>

PR sanitizer/94910
* asan.c (asan_emit_stack_protection): Emit
also **SavedFlagPtr(FakeStack, class_id) = 0 in order to release
a stack frame.

(cherry picked from commit 8b6731e674c76cb48a417f2eef74ced92a17f469)

4 years agoDaily bump.
GCC Administrator [Fri, 12 Jun 2020 00:18:20 +0000 (00:18 +0000)]
Daily bump.

4 years agoc++: Fix bogus -Wparentheses warning [PR95344]
Marek Polacek [Thu, 11 Jun 2020 22:38:00 +0000 (18:38 -0400)]
c++: Fix bogus -Wparentheses warning [PR95344]

Since r267272, which added location wrappers, cp_fold loses
TREE_NO_WARNING on a MODIFY_EXPR that finish_parenthesized_expr set, and
that results in a bogus -Wparentheses warning.

I.e., previously we had "b = 1" but now we have "VIEW_CONVERT_EXPR<bool>(b) = 1"
and cp_fold_maybe_rvalue folds away the location wrapper and so we do
2718             x = fold_build2_loc (loc, code, TREE_TYPE (x), op0, op1);
in cp_fold and the flag is lost.

PR c++/95344
* cp-gimplify.c (cp_fold) <case MODIFY_EXPR>: Don't set
TREE_THIS_VOLATILE here.
(cp_fold): Set it here along with TREE_NO_WARNING.

* c-c++-common/Wparentheses-2.c: New test.

4 years agoc++: Fix ICE in check_local_shadow with enum [PR95560]
Marek Polacek [Thu, 11 Jun 2020 21:58:21 +0000 (17:58 -0400)]
c++: Fix ICE in check_local_shadow with enum [PR95560]

Another indication that perhaps this warning is emitted too early.  We
crash because same_type_p gets a null type: we have an enumerator
without a fixed underlying type and finish_enum_value_list hasn't yet
run.  So check if the type is null before calling same_type_p.

PR c++/95560
* name-lookup.c (check_local_shadow): Check if types are
non-null before calling same_type_p.

* g++.dg/warn/Wshadow-compatible-local-3.C: New test.

4 years agoPR fortran/95611 - ICE in access_attr_decl, at fortran/decl.c:9075
Harald Anlauf [Thu, 11 Jun 2020 19:03:48 +0000 (21:03 +0200)]
PR fortran/95611 - ICE in access_attr_decl, at fortran/decl.c:9075

When reporting a duplicate access specification of an operator, refer to
the proper symbol.

2020-06-11  Harald Anlauf <anlauf@gmx.de>

gcc/fortran/
PR fortran/95611
* decl.c (access_attr_decl): Use correct symbol in error message.

Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 393ccb72566dc004b9ab5c3b8fb6fdca6c095812)

4 years agoPR fortran/95091 - Buffer overflows with submodules and long symbols
Harald Anlauf [Sun, 7 Jun 2020 14:43:12 +0000 (16:43 +0200)]
PR fortran/95091 - Buffer overflows with submodules and long symbols

Add cast to fix bootstrap error with -Werror=sign-compare.

gcc/fortran/
PR fortran/95091
* class.c (gfc_hash_value): Add cast.

(cherry picked from commit 5aaccde3db39fac7e7f6677ceccc1eadd9c6a424)

4 years agoPR fortran/95091 - Buffer overflows with submodules and long symbols
Harald Anlauf [Sun, 7 Jun 2020 12:47:24 +0000 (14:47 +0200)]
PR fortran/95091 - Buffer overflows with submodules and long symbols

With submodules, name mangling results in long internal symbols.  This
requires adjustment of the sizes of temporaries to avoid buffer overflows.

2020-06-07  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95091
* class.c (get_unique_type_string, gfc_hash_value): Enlarge
buffers, and check whether the strings returned by
get_unique_type_string() fit.

(cherry picked from commit b342cfd648e6658363c7c8fef83af8f59dba1795)

4 years agoDaily bump.
GCC Administrator [Thu, 11 Jun 2020 00:18:31 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Wed, 10 Jun 2020 00:18:31 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Tue, 9 Jun 2020 00:18:34 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Mon, 8 Jun 2020 00:18:07 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sun, 7 Jun 2020 00:18:03 +0000 (00:18 +0000)]
Daily bump.

4 years agopr94833, fix vec_first_match_index for nulls
Carl Love [Wed, 29 Apr 2020 15:23:11 +0000 (10:23 -0500)]
pr94833, fix vec_first_match_index for nulls

Backported patch from mainline.  Updated ChangeLog format
commit 24f68831d25bad739a6fe167a58b5b4c0c3cbf9a
Author: Carl Love <cel@us.ibm.com>
Date:   Wed Apr 29 10:23:11 2020 -0500

2020-04-30  Carl Love  <cel@us.ibm.com>

gcc/
PR target/94833
* config/rs6000/vsx.md (define_expand): Fix instruction generation for
first_match_index_<mode>.

gcc/testsuite/
PR target/94833
* gcc.target/powerpc/builtins-8-p9-runnable.c (main): Add
additional test cases with zero vector elements.

4 years agoDaily bump.
GCC Administrator [Sat, 6 Jun 2020 00:18:13 +0000 (00:18 +0000)]
Daily bump.

4 years agoPR fortran/95373 - ICE in build_reference_type, at tree.c:7942
Harald Anlauf [Sat, 30 May 2020 18:59:41 +0000 (20:59 +0200)]
PR fortran/95373 - ICE in build_reference_type, at tree.c:7942

The use of KIND, LEN, RE, and IM inquiry references for applicable intrinsic
types is valid only for suffienctly new Fortran standards.  Add appropriate
checks in the appropriate place.

2020-05-30  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95373
* primary.c (is_inquiry_ref): Move validity check of inquiry
references against selected Fortran standard from here...
(gfc_match_varspec) ...to here.

gcc/testsuite/
PR fortran/95373
* gfortran.dg/pr95373_1.f90: Adjust error messages.
* gfortran.dg/pr95373_2.f90: Adjust error message.

(cherry picked from commit dd38c765a04d06c775134a135f68b18c3b7c9c78)

4 years agoPR fortran/95373 - ICE in build_reference_type, at tree.c:7942
Harald Anlauf [Thu, 28 May 2020 20:28:08 +0000 (22:28 +0200)]
PR fortran/95373 - ICE in build_reference_type, at tree.c:7942

The use of KIND, LEN, RE, and IM inquiry references for applicable intrinsic
types is valid only for suffienctly new Fortran standards.  Add appropriate
check.

2020-05-28  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95373
* primary.c (is_inquiry_ref): Check validity of inquiry
references against selected Fortran standard.

gcc/testsuite/
PR fortran/95373
* gfortran.dg/pr95373_1.f90: New test.
* gfortran.dg/pr95373_2.f90: New test.

(cherry picked from commit 5c715e6a2990cfb6c15acc1ee14219523534ec69)

4 years agoPR fortran/95106 - truncation of long symbol names with EQUIVALENCE
Harald Anlauf [Sun, 24 May 2020 19:35:04 +0000 (21:35 +0200)]
PR fortran/95106 - truncation of long symbol names with EQUIVALENCE

For long module names, the generated name-mangled symbol was
truncated, leading to bogus warnings about COMMON block
mismatches.  Provide sufficiently large temporaries.

gcc/fortran/

2020-05-24  Harald Anlauf  <anlauf@gmx.de>

PR fortran/95106
* trans-common.c (gfc_sym_mangled_common_id): Enlarge temporaries
for name-mangling.

gcc/testsuite/

2020-05-24  Harald Anlauf  <anlauf@gmx.de>

PR fortran/95106
* gfortran.dg/equiv_11.f90: New test.

(cherry picked from commit d176184d98a00ab379ae5959aed1908a79995e6b)

4 years agoPR fortran/95530, PR fortran/95537 - Buffer overflows with long symbols
Harald Anlauf [Fri, 5 Jun 2020 18:30:34 +0000 (20:30 +0200)]
PR fortran/95530, PR fortran/95537 - Buffer overflows with long symbols

The testcases for PR95090 and PR95106 trigger buffer overflows with long
symbols that were found with an instrumented compiler.  Enlarge the
affected buffers, and add checks that the buffers will suffice.

2020-06-05  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95530
PR fortran/95537
* decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
string copy to detect buffer overflow.
* gfortran.h (gfc_common_head): Enlarge buffer.
* trans-common.c (finish_equivalences): Enhance string copy to
detect buffer overflow.

(cherry picked from commit bcd96c9cce962ca5b2c6f8459597fb759f945ccf)

4 years agoPR fortran/95500 - Segfault compiling extra interface on intrinsic
Harald Anlauf [Thu, 4 Jun 2020 19:00:33 +0000 (21:00 +0200)]
PR fortran/95500 - Segfault compiling extra interface on intrinsic

Converting an expression so that it can be passed by reference could
result in a NULL pointer dereference.

2020-06-04  Steven G. Kargl  <kargl@gcc.gnu.org>
    Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
PR fortran/95500
* trans-expr.c (gfc_conv_expr_reference): Do not dereference NULL
pointer.

gcc/testsuite/
PR fortran/95500
* gfortran.dg/pr95500.f90: New test.

(cherry picked from commit 8c727bdf4acf28c8315b119a1c8f6d6af745c2af)

4 years agox86: Update Intel processor detection
H.J. Lu [Mon, 18 May 2020 12:35:27 +0000 (05:35 -0700)]
x86: Update Intel processor detection

Add cpu model numbers for Intel Airmont, Tremont, Comet Lake, Ice Lake
and Tiger Lake processor families.

* config/i386/driver-i386.c (host_detect_local_cpu): Support
Intel Airmont, Tremont, Comet Lake, Ice Lake and Tiger Lake
processor families.

4 years agoDaily bump.
GCC Administrator [Fri, 5 Jun 2020 00:18:16 +0000 (00:18 +0000)]
Daily bump.

4 years ago'libgomp.oacc-fortran/{error_,}stop-{1,2,3}.f': initialize before the checkpoint
Thomas Schwinge [Wed, 6 May 2020 08:05:49 +0000 (10:05 +0200)]
'libgomp.oacc-fortran/{error_,}stop-{1,2,3}.f': initialize before the checkpoint

If, for example, GCC is configured such that 'libgomp-plugin-nvptx.so.1'
dynamically links against 'libcuda.so.1', but testing is run on a system where
there is no 'libcuda.so.1', this produces output such as:

    PASS: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O0  (test for excess errors)
    PASS: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O0  execution test
    FAIL: libgomp.oacc-fortran/error_stop-1.f -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1 -foffload=disable  -O0  output pattern test, is  CheCKpOInT

    libgomp: while loading libgomp-plugin-nvptx.so.1: libcuda.so.1: cannot open shared object file: No such file or directory
    ERROR STOP

    Error termination. Backtrace: [...]
    , should match CheCKpOInT(
    |
    |^M)+ERROR STOP (
    |
    |^M)+Error termination.*

..., where after 'CheCKpOInT' we got 'libgomp: while loading [...]' injected
before the expected 'ERROR STOP'.

libgomp/
* testsuite/libgomp.oacc-fortran/error_stop-1.f: Initialize before
the checkpoint.
* testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise.
* testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-1.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-2.f: Likewise.
* testsuite/libgomp.oacc-fortran/stop-3.f: Likewise.

(cherry picked from commit 1e378edd8f038c52914bc6cac8f6dd5a5c4f8a98)

4 years agoDaily bump.
GCC Administrator [Thu, 4 Jun 2020 00:18:14 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Wed, 3 Jun 2020 00:18:19 +0000 (00:18 +0000)]
Daily bump.

4 years agoaarch64: Add initial support for -mcpu=zeus
Kyrylo Tkachov [Tue, 2 Jun 2020 16:50:47 +0000 (17:50 +0100)]
aarch64: Add initial support for -mcpu=zeus

This patch adds support for the Arm Zeus CPU.
Bootstrapped and tested on aarch64-none-linux-gnu.

2020-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* config/aarch64/aarch64-cores.def (zeus): Define.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi (AArch64 Options): Document zeus -mcpu option.

4 years agoRemove bad ChangeLog entry.
Martin Liska [Tue, 2 Jun 2020 06:56:27 +0000 (08:56 +0200)]
Remove bad ChangeLog entry.

4 years agoRemove accidentally installed file.
Martin Liska [Tue, 2 Jun 2020 06:54:54 +0000 (08:54 +0200)]
Remove accidentally installed file.

ChangeLog:

* -: Remove.

4 years agoDaily bump.
GCC Administrator [Tue, 2 Jun 2020 00:18:16 +0000 (00:18 +0000)]
Daily bump.

4 years agoFinalization depends on the expression, not on the component.
Thomas Koenig [Sun, 31 May 2020 08:26:40 +0000 (10:26 +0200)]
Finalization depends on the expression, not on the component.

This patch fixes a 8/9/10/11 regression, where finalized types
were not finalized (and deallocated), which led to memory
leaks.

gcc/fortran/ChangeLog:

2020-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/94361
* class.c (finalize_component): Use expr->finalized instead of
comp->finalized.
* gfortran.h (gfc_component): Remove finalized member.
(gfc_expr): Add it here instead.

gcc/testsuite/ChangeLog:

2020-05-24  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/94361
* gfortran.dg/finalize_28.f90: Adjusted free counts.
* gfortran.dg/finalize_33.f90: Likewise.
* gfortran.dg/finalize_34.f90: Likewise.
* gfortran.dg/finalize_35.f90: New test.

(cherry picked from commit 811f902b764c5a13178cbd7588e96c16b3fab504)

4 years agoDaily bump.
GCC Administrator [Mon, 1 Jun 2020 00:18:13 +0000 (00:18 +0000)]
Daily bump.

4 years agoi386: Define __ILP32__ and _ILP32 for all 32-bit targets
Gerald Pfeifer [Thu, 7 May 2020 22:48:52 +0000 (00:48 +0200)]
i386: Define __ILP32__ and _ILP32 for all 32-bit targets

* config/i386/i386-c.c (ix86_target_macros): Define _ILP32 and
__ILP32__ for 32-bit targets.

(cherry picked from commit 13a46321516e2efd3bbb1f1899c539c6724240a9)

4 years agoDaily bump.
GCC Administrator [Sun, 31 May 2020 00:18:08 +0000 (00:18 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 30 May 2020 00:18:15 +0000 (00:18 +0000)]
Daily bump.

4 years agoaarch64: PR target/94591: Don't generate invalid REV64 insns
Alex Coplan [Fri, 29 May 2020 13:19:23 +0000 (14:19 +0100)]
aarch64: PR target/94591: Don't generate invalid REV64 insns

This fixes PR94591. The problem was the function
aarch64_evpc_rev_local() matching vector permutations that were not
reversals. In particular, prior to this patch, this function matched the
identity permutation which led to generating bogus REV64 insns which
were rejected by the assembler.

gcc/
PR target/94591
* config/aarch64/aarch64.c (aarch64_evpc_rev_local): Don't match
identity permutation.

gcc/testsuite/
PR target/94591
* gcc.c-torture/execute/pr94591.c: New test.

(cherry picked from commit 98452668d362bb9e6358f7eb5cff69f4f5ab1d45)

4 years ago[AArch64] Use __getauxval instead of getauxval in LSE detection code in libgcc
Kyrylo Tkachov [Wed, 6 May 2020 15:20:38 +0000 (16:20 +0100)]
[AArch64] Use __getauxval instead of getauxval in LSE detection code in libgcc

This version of the fix uses __getauxval instead of getauxval.
The whole thing is guarded simply on __gnu_linux__.
__getauxval was introduced in 2.16 but the aarch64 port was added in 2.17 so in practice I expect all aarch64 glibcs to support __getauxval.

Bootstrapped and tested on aarch64-none-linux-gnu.
Also tested on aarch64-none-elf.

2020-05-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

* config/aarch64/lse-init.c (init_have_lse_atomics): Use __getauxval
instead of getauxval.
(AT_HWCAP): Define.
(HWCAP_ATOMICS): Define.
Guard detection on __gnu_linux__.

(cherry picked from commit 1266778548e20de82983b6446f3cb685068cfb1e)

4 years agogcov-tool: Flexible endian adjustment for merging coverage data
Martin Liska [Thu, 28 May 2020 06:16:58 +0000 (08:16 +0200)]
gcov-tool: Flexible endian adjustment for merging coverage data

gcc/ChangeLog:
2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

PR gcov-profile/95332
* gcov-io.c (gcov_var::endian): Move field.
(from_file): Add IN_GCOV_TOOL check.
* gcov-io.h (gcov_magic): Ditto.

libgcc/ChangeLog:
2020-05-27  Dong JianQiang  <dongjianqiang2@huawei.com>

PR gcov-profile/95332
* libgcov-util.c (read_gcda_file): Call gcov_magic.
* libgcov.h (gcov_magic): Disable GCC poison.

(cherry picked from commit 17d1594bfe08f3c768e024b180816cbe37ac08ac)

4 years agoFix various limitations of git-backport.py.
Martin Liska [Fri, 29 May 2020 09:29:25 +0000 (11:29 +0200)]
Fix various limitations of git-backport.py.

I've just tested the script and I'm going to install the patch
to all active branches.

contrib/ChangeLog:

* git-backport.py: The script did 'git co HEAD~' when
there was no modified ChangeLog file in a successful
git cherry pick.
Run cherry-pick --continue without editor.

(cherry picked from commit 24663f1f6d709daf8913484914ed01af9f7a480a)

4 years agoDaily bump.
GCC Administrator [Fri, 29 May 2020 00:18:04 +0000 (00:18 +0000)]
Daily bump.

4 years agoPR fortran/95104 - Segfault on a legal WAIT statement
Harald Anlauf [Thu, 28 May 2020 19:53:17 +0000 (21:53 +0200)]
PR fortran/95104 - Segfault on a legal WAIT statement

The initial commit for this PR uncovered a latent issue with unit locking
in the Fortran run-time library.  Add check for valid unit.

2020-05-28  Harald Anlauf  <anlauf@gmx.de>

libgfortran/
PR libfortran/95104
* io/unit.c (unlock_unit): Guard by check for NULL pointer.

(cherry picked from commit 6ce3d791dfcba469e709935aba5743640f7d4959)

4 years agoFortran : "type is( real(kind(1.)) )" spurious syntax error PR94397
Mark Eggleston [Wed, 1 Apr 2020 08:52:41 +0000 (09:52 +0100)]
Fortran  : "type is( real(kind(1.)) )" spurious syntax error PR94397

Based on a patch in the comments of the PR. That patch fixed this
problem but caused the test cases for PR93484 to fail. It has been
changed to reduce initialisation expressions if the expression is
not EXPR_VARIABLE and not EXPR_CONSTANT.

2020-05-28  Steven G. Kargl  <kargl@gcc.gnu.org>
    Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/fortran/

PR fortran/94397
* match.c (gfc_match_type_spec): New variable ok initialised
to true. Set ok with the return value of gfc_reduce_init_expr
called only if the expression is not EXPR_CONSTANT and is not
EXPR_VARIABLE. Add !ok to the check for type not being integer
or the rank being greater than zero.

2020-05-28  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

PR fortran/94397
* gfortran.dg/pr94397.F90: New test.

(cherry picked from commit 3ea6977d0f1813d982743a09660eec1760e981ec)

4 years agoFortran : ICE in gfc_trans_label_assign PR50392
Mark Eggleston [Thu, 7 May 2020 07:15:26 +0000 (08:15 +0100)]
Fortran  : ICE in gfc_trans_label_assign PR50392

A function may contain an assigned goto.  If the the return variable
is an integer a statement can be assigned to it.  Prior to this fix
this resulted in an ICE.

2020-05-28  Tobias Burnus  <tobias@codesourcery.com>

gcc/fortran/

PR fortran/50392
* trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
delimiters.  Add auxiliary variables if a label is assigned to
a return variable. (gfc_gat_fake_result): If the symbol has an
assign attribute set declaration from the symbol's backend
declaration.

2020-05-28  Mark Eggleston  <markeggleston@gnu.gcc.org>

gcc/testsuite/

PR fortran/50392
* gfortran.dg/pr50392.f: New test.

(cherry picked from commit a7fd43c38f7469a3ef5ee30e889d60e1376d4dfc)

4 years agoDaily bump.
GCC Administrator [Thu, 28 May 2020 04:25:40 +0000 (04:25 +0000)]
Daily bump.

4 years agoPR fortran/95104 - Segfault on a legal WAIT statement
Harald Anlauf [Tue, 26 May 2020 21:29:52 +0000 (23:29 +0200)]
PR fortran/95104 - Segfault on a legal WAIT statement

Referencing a unit in a WAIT statement that has not been opened before
resulted in a NULL pointer dereference.  Check for this condition.

2020-05-26  Harald Anlauf  <anlauf@gmx.de>

libgfortran/
PR libfortran/95104
* io/transfer.c (st_wait_async): Do not dereference NULL pointer.

gcc/testsuite/
PR libfortran/95104
* gfortran.dg/pr95104.f90: New test.

Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 56f03cd12be26828788a27f6f3c250041a958e45)

4 years agoFixes a hang on an invalid ID in a WAIT statement.
Thomas Koenig [Sat, 23 May 2020 17:01:43 +0000 (19:01 +0200)]
Fixes a hang on an invalid ID in a WAIT statement.

gcc/fortran/ChangeLog:

2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/95191
* libgfortran.h (libgfortran_error_codes): Add
LIBERROR_BAD_WAIT_ID.

libgfortran/ChangeLog:

2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/95191
* io/async.c (async_wait_id): Generate error if ID is higher
than the highest current ID.
* runtime/error.c (translate_error): Handle LIBERROR_BAD_WAIT_ID.

libgomp/ChangeLog:

2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/95191
* testsuite/libgomp.fortran/async_io_9.f90: New test.

(cherry picked from commit 8df7ee67f6fdc780e9453f2baa8d1bf62c000761)

4 years agoAdd new git-backport.py script.
Martin Liska [Tue, 26 May 2020 13:32:32 +0000 (15:32 +0200)]
Add new git-backport.py script.

contrib/ChangeLog:

* git-backport.py: New file.

4 years agoDaily bump. misc/first-auto-changelog-9
GCC Administrator [Wed, 27 May 2020 07:47:38 +0000 (07:47 +0000)]
Daily bump.

4 years ago[rs6000] fix mffsl emulation
Alexandre Oliva [Tue, 26 May 2020 14:28:42 +0000 (11:28 -0300)]
[rs6000] fix mffsl emulation

The emulation of mffsl with mffs, used when !TARGET_P9_MISC, is going
through the motions, but not storing the result in the given
operands[0]; it rather modifies operands[0] without effect.  It also
creates a DImode pseudo that it doesn't use, overwriting subregs
instead.

The patch below fixes all of these, the indentation and a typo.

I'm concerned about several issues in the mffsl testcase.  First, I
don't see that comparing the values as doubles rather than as long
longs is desirable.  These are FPSCR bitfields, not FP numbers.  I
understand mffs et al use double because they output to FP registers,
and the bit patterns are subnormal FP numbers, so it works, but given
the need for bit masking of at least one side, I'm changing the
compare to long longs.

Another issue with the test is that, if the compare fails, it calls
mffsl again to print the value, as if it would yield the same result.
But part of the FPSCR that mffsl (emulated with mffs or not) copies to
the output FP register is the FPCC, so the fcmpu used to compare the
result of the first mffsl will modify FPSCR and thus the result of the
second mffsl call.  After changing the compare, this is no longer the
case, but I still think it's better to make absolutely sure what we
print is what we compared.

Yet another issue is that the test assumed the mffs bits that are not
to be extracted by mffsl to be already zero, instead of masking them
out explicitly.  This is not about the mffs emulation in the mffsl
implementation, but about the mffs use in the test proper.  The bits
appear to be zero indeed, as the bits left out are for sticky
exceptions, but there are reserved parts of FPSCR that might turn out
to be set in the future, so we're better off masking them out
explicitly, otherwise those bits could cause the compare to fail.

If some future mffsl is changed so that it copies additional nonzero
bits, the test will fail, and then we'll have a chance to adjust it
and the emulation.

gcc/ChangeLog:

PR target/94812
* config/rs6000/rs6000.md (rs6000_mffsl): Copy result to
output operand in emulation.  Don't overwrite pseudos.

gcc/testsuite/ChangeLog:

PR target/94812
* gcc.target/powerpc/test_mffsl.c: Call mffsl only once.
Reinterpret the doubles as long longs for compares.  Mask out
mffs bits that are not expected from mffsl.

(cherry picked from commit 50714f45eeaf315a0b55d3db3de3bf8df8e94b04)

4 years agoDaily bump.
GCC Administrator [Tue, 26 May 2020 00:17:54 +0000 (00:17 +0000)]
Daily bump.

4 years agoc++: constexpr and lambda capture [PR90212]
Jason Merrill [Mon, 25 May 2020 22:38:09 +0000 (18:38 -0400)]
c++: constexpr and lambda capture [PR90212]

This is the same issue as PR86429, just in potential_constant_expression_1
rather than cxx_eval_constant_expression.  As in that case, when we're
trying to evaluate a constant expression within a lambda, we don't have a
constant closure object to refer to, but we can try to refer directly to the
captured variable.

gcc/cp/ChangeLog
2020-05-05  Jason Merrill  <jason@redhat.com>

PR c++/90212
* constexpr.c (potential_constant_expression_1): In a lambda
function, consider a captured variable directly.

4 years agoc++: Local class DMI using local static [PR90479]
Jason Merrill [Mon, 25 May 2020 22:38:09 +0000 (18:38 -0400)]
c++: Local class DMI using local static [PR90479]

For default member initializers in templates it's important to push into the
right context during get_nsdmi.  But for a local class that's not possible,
and trying leaves the function context we need to be in, so don't try.

gcc/cp/ChangeLog
2020-05-01  Jason Merrill  <jason@redhat.com>

PR c++/90479
* init.c (get_nsdmi): Don't push_to_top_level for a local class.

4 years agoc++: -fmerge-all-constants vs. destructors [PR91529]
Jason Merrill [Mon, 25 May 2020 22:38:09 +0000 (18:38 -0400)]
c++: -fmerge-all-constants vs. destructors [PR91529]

cp_finish_decl avoids setting TREE_READONLY on TREE_STATIC variables that
have non-constant construction or destruction, but -fmerge-all-constants was
converting an automatic variable to static while leaving TREE_READONLY set.

Fixed by clearing the flag in cp_finish_decl in the presence of
-fmerge-all-constants.

gcc/cp/ChangeLog
2020-05-01  Jason Merrill  <jason@redhat.com>

PR c++/91529
* decl.c (cp_finish_decl): Also clear TREE_READONLY if
-fmerge-all-constants.

4 years agoc++: generic lambda and -fsanitize=vla-bound [PR93822]
Jason Merrill [Mon, 25 May 2020 22:38:09 +0000 (18:38 -0400)]
c++: generic lambda and -fsanitize=vla-bound [PR93822]

Within the generic lambda the VLA capture proxy VAR_DECL has DECL_VALUE_EXPR
which is a NOP_EXPR to the VLA type of the proxy.  The problem here was that
when instantiating we were tsubsting that type twice, once for the type of
the DECL and once for the type of the NOP_EXPR, and getting two
different (though equivalent) types.  Then gimplify_type_sizes fixed up the
type of the DECL, but that didn't affect the type of the NOP_EXPR, leading
to sadness.

Fixed by directly reusing the type from the DECL.

gcc/cp/ChangeLog
2020-05-01  Jason Merrill  <jason@redhat.com>

PR c++/93822
* pt.c (tsubst_decl): Make sure DECL_VALUE_EXPR continues to have
the same type as the variable.

4 years agoDaily bump.
GCC Administrator [Mon, 25 May 2020 00:17:52 +0000 (00:17 +0000)]
Daily bump.

4 years agox86: Handle -mavx512vpopcntdq for -march=native
H.J. Lu [Fri, 22 May 2020 11:18:34 +0000 (04:18 -0700)]
x86: Handle -mavx512vpopcntdq for -march=native

Add -mavx512vpopcntdq for -march=native if AVX512VPOPCNTDQ is available.

PR target/95258
* config/i386/driver-i386.c (host_detect_local_cpu): Detect
AVX512VPOPCNTDQ.

(cherry picked from commit 808b611bfb4b05703ea174e50874c711dca44c98)

4 years agoDaily bump.
GCC Administrator [Sun, 24 May 2020 00:17:49 +0000 (00:17 +0000)]
Daily bump.

4 years agoDaily bump.
GCC Administrator [Sat, 23 May 2020 00:17:41 +0000 (00:17 +0000)]
Daily bump.

4 years agoAdd early return for invalid STATUS for close.
Thomas Koenig [Thu, 14 May 2020 16:30:27 +0000 (18:30 +0200)]
Add early return for invalid STATUS for close.

2020-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/95119
* io/close.c (close_status): Add CLOSE_INVALID.
(st_close): Return early on invalid STATUS parameter.

2020-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR libfortran/95119
* testsuite/libgomp.fortran/close_errors_1.f90: New test.

(cherry picked from commit cdc34b505796327b3eee9e97bc5f27ba71fd9e7a)
(cherry picked from commit d975519ad1066ed0397714c91aafadadb52a63dd)
(cherry picked from commit 8275e0a6686b465d4d1717784e3e864305d37d02)

4 years agoAdd missing unit dependence vector in data dependence analysis
Bin Cheng [Fri, 22 May 2020 03:42:11 +0000 (11:42 +0800)]
Add missing unit dependence vector in data dependence analysis

Current data dependence analysis misses unit distant vector if DRs in
DDR have the same invariant access functions.  This adds the vector as
the constant access function case.

Also fix typo in testcase.

Backport from master.

2020-05-13  Bin Cheng  <bin.cheng@linux.alibaba.com>

gcc/
PR tree-optimization/94969
* tree-data-ref.c (constant_access_functions): Rename to...
(invariant_access_functions): ...this.  Add parameter.  Check for
invariant access function, rather than constant.
(build_classic_dist_vector): Call above function.
* tree-loop-distribution.c (pg_add_dependence_edges): Add comment.

gcc/testsuite/
PR tree-optimization/94969
* gcc.dg/tree-ssa/pr94969.c: New test.

2020-05-13  Jakub Jelinek  <jakub@redhat.com>

gcc/testsuite/
PR tree-optimization/95110
* gcc.dg/tree-ssa/pr94969.c: Swap scan-tree-dump-not arguments.

4 years agoDaily bump.
GCC Administrator [Fri, 22 May 2020 00:17:38 +0000 (00:17 +0000)]
Daily bump.

4 years agoFix backport due to usage for x_target_flags.
Martin Liska [Thu, 21 May 2020 14:53:35 +0000 (16:53 +0200)]
Fix backport due to usage for x_target_flags.

gcc/ChangeLog:

* common/config/aarch64/aarch64-common.c (aarch64_handle_option):
Use MASK_OUTLINE_ATOMICS for x_target_flags.

(cherry picked from commit f26cfe27e19eeb538675ffb2de0503b760662261)

4 years agoAdd outline-atomics to target attribute.
Martin Liska [Thu, 21 May 2020 10:45:47 +0000 (12:45 +0200)]
Add outline-atomics to target attribute.

* common/config/aarch64/aarch64-common.c (aarch64_handle_option):
Handle OPT_moutline_atomics.
* config/aarch64/aarch64.c: Add outline-atomics to
aarch64_attributes.

* doc/extend.texi: Document the newly added target attribute.

* gcc.target/aarch64/target_attr_20.c: New test.
* gcc.target/aarch64/target_attr_21.c: New test.

(cherry picked from commit 9e02b45ffc60e0078bde3c56a14f00c54b7f8039)

4 years agox86: Update VPCLMULQDQ check
H.J. Lu [Wed, 20 May 2020 01:55:08 +0000 (18:55 -0700)]
x86: Update VPCLMULQDQ check

Update VPCLMULQDQ check to support processors with AVX version of
VPCLMULQDQ.

Backport from master
PR target/91695
* config/i386/cpuinfo.c (get_available_features): Fix VPCLMULQDQ
check.

(cherry picked from commit 1e46a443f25d26816536c0c480211714b123a1d5)

4 years agoDaily bump.
GCC Administrator [Thu, 21 May 2020 00:18:01 +0000 (00:18 +0000)]
Daily bump.

4 years agoFortran : ProcPtr function results: 'ppr@' in error message PR39695
Mark Eggleston [Thu, 7 May 2020 07:02:02 +0000 (08:02 +0100)]
Fortran  : ProcPtr function results: 'ppr@' in error message PR39695

The value 'ppr@' is set in the name of result symbol, the actual
name of the symbol is in the procedure name symbol pointed
to by the result symbol's namespace (ns). When reporting errors for
symbols that have the proc_pointer attribute check whether the
result attribute is set and set the name accordingly.

Backported from master.

2020-05-20  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/fortran/

PR fortran/39695
* resolve.c (resolve_fl_procedure): Set name depending on
whether the result attribute is set.  For PROCEDURE/RESULT
conflict use the name in sym->ns->proc_name->name.
* symbol.c (gfc_add_type): Add check for function and result
attributes use sym->ns->proc_name->name if both are set.
Where the symbol cannot have a type use the name in
sym->ns->proc_name->name.

2020-05-20  Mark Eggleston  <markeggleston@gcc.gnu.org>

gcc/testsuite/

PR fortran/39695
* gfortran.dg/pr39695_1.f90: New test.
* gfortran.dg/pr39695_2.f90: New test.
* gfortran.dg/pr39695_3.f90: New test.
* gfortran.dg/pr39695_4.f90: New test.

(cherry picked from commit eb069ae8819c3a84d7f78becc5501e21ee3a9554)

4 years agoDaily bump.
GCC Administrator [Wed, 20 May 2020 00:18:00 +0000 (00:18 +0000)]
Daily bump.

4 years agox86: Update GFNI check
H.J. Lu [Tue, 19 May 2020 21:42:12 +0000 (14:42 -0700)]
x86: Update GFNI check

Update GFNI check to support processors with SSE and AVX versions of GFNI.

Backport from master
PR target/95220
* config/i386/cpuinfo.c (get_available_features): Fix
FEATURE_GFNI check.

4 years agoDaily bump.
GCC Administrator [Tue, 19 May 2020 00:18:07 +0000 (00:18 +0000)]
Daily bump.

4 years agoRequire powerpc_vsx_ok in gcc.target/powerpc/pr71763.c
Douglas Rupp [Mon, 18 May 2020 18:43:48 +0000 (11:43 -0700)]
Require powerpc_vsx_ok in gcc.target/powerpc/pr71763.c

We're getting an error when running this test on PowerPC VxWorks 7,
due to an unexpected warning:

    | Excess errors:
    | cc1: warning: '-mvsx' and '-mno-altivec' are incompatible

The warning comes from a combination of factors:
  - The test itself uses -mvsx explicitly via the following directive:
       // { dg-options "-O1 -mvsx" }
  - Our toolchain was configured so as to make -mno-altivec
    the default;
  - These two options are mutually exclusive.

This commit adds a powerpc_vsx_ok dg-require-effective-target directive
to that test, and thus making it UNSUPPORTED instead.

Tested on PowerPC VxWorks 7. Also tested on PowerPC ELF as well,
a platform where we do not make -mno-altivec the default, to verify
that the test continues to run as usual in that case.

gcc/testsuite/

        * gcc.target/powerpc/pr71763.c: Require powerpc_vsx_ok.

(cherry picked from commit c917584aa9ec32934acf0082ed383b04f49fd174)

4 years agod: Fix multiple definition error when using mixins and interfaces.
Iain Buclaw [Mon, 16 Mar 2020 22:04:49 +0000 (23:04 +0100)]
d: Fix multiple definition error when using mixins and interfaces.

gcc/d/ChangeLog:

PR d/92216
* decl.cc (make_thunk): Don't set TREE_PUBLIC on thunks if the target
function is external to the current compilation.

gcc/testsuite/ChangeLog:

PR d/92216
* gdc.dg/imports/pr92216.d: New.
* gdc.dg/pr92216.d: New test.

4 years agoDaily bump.
GCC Administrator [Mon, 18 May 2020 00:17:45 +0000 (00:17 +0000)]
Daily bump.

4 years agod: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959
Iain Buclaw [Sun, 17 May 2020 14:28:24 +0000 (16:28 +0200)]
d: Fix ICE in verify_gimple_stmt, at tree-cfg.c:4959

Both array concat and array new expressions wrapped any temporaries
created into a BIND_EXPR.  This does not work if an expression used to
construct the result requires scope destruction, which is represented by
a TARGET_EXPR with a clean-up, and a CLEANUP_POINT_EXPR at the
location where the temporaries logically go out of scope.  The reason
for this not working is because the lowering of cleanup point
expressions does not traverse inside BIND_EXPRs to expand any gimple
cleanup expressions within.

The use of creating BIND_EXPR has been removed at both locations, and
replaced with a normal temporary variable that has initialization
delayed until its address is taken.

gcc/d/ChangeLog:

PR d/94970
* d-codegen.cc (force_target_expr): Move create_temporary_var
implementation inline here.
(create_temporary_var): Remove.
(maybe_temporary_var): Remove.
(bind_expr): Remove.
* d-convert.cc (d_array_convert): Use build_local_temp to generate
temporaries, and generate its assignment.
* d-tree.h (create_temporary_var): Remove.
(maybe_temporary_var): Remove.
(d_array_convert): Remove vars argument.
* expr.cc (ExprVisitor::visit (CatExp *)): Use build_local_temp to
generate temporaries, don't wrap them in a BIND_EXPR.
(ExprVisitor::visit (NewExp *)): Likewise.

gcc/testsuite/ChangeLog:

PR d/94970
* gdc.dg/pr94970.d: New test.

4 years agoDaily bump.
GCC Administrator [Sun, 17 May 2020 00:18:03 +0000 (00:18 +0000)]
Daily bump.

4 years agod: Fix wrong vtable offset in virtual function call
Iain Buclaw [Sat, 16 May 2020 21:33:15 +0000 (23:33 +0200)]
d: Fix wrong vtable offset in virtual function call

The Semantic (pass 1) analysis for classes is handled by
ClassDeclaration::semantic.  For a given class, this method may be ran
multiple times in order to resolve forward references.  The method
incrementally tries to resolve the types referred to by the members of
the class.

The subsequent calls to this method are short-circuited if the class
members have been fully analyzed.  For this the code tests that it is
not the first/main call to the method (semanticRun == PASS.init else
branch), scx is not set, and that the this->symtab is already set.  If
all these conditions are met, the method returns.  But before returning,
the method was setting this->semanticRun to PASSsemanticdone.  It should
not set semanticRun since the class has not been fully analyzed yet.
The base class analysis for this class could be pending and as a result
vtable may not have been fully created.

This fake setting of semanticRun results in the semantic analyzer to
believe that the class has been fully analyzed.  As exposed by the
issues in upstream, it may result in compile time errors when a derived
type class is getting analyzed and because of this fake semanticdone on
the base class, the semantic analysis construes that an overriden method
is not defined in the base class.  PR95155 exposes anoter scenario where
a buggy vtable may be created and a call to a class method may result in
execution of some adhoc code.

gcc/d/ChangeLog:

PR d/95155
* dmd/dclass.c (ClassDeclaration::semantic): Don't prematurely
set done on semantic analysis.

gcc/testsuite/ChangeLog:

PR d/95155
* gdc.test/compilable/imports/pr9471a.d: New test.
* gdc.test/compilable/imports/pr9471b.d: New test.
* gdc.test/compilable/imports/pr9471c.d: New test.
* gdc.test/compilable/imports/pr9471d.d: New test.
* gdc.test/compilable/pr9471.d: New test.

4 years agolibphobos: Fix struct layout of stat_t on sparc-*-solaris*
Iain Buclaw [Sat, 16 May 2020 20:32:17 +0000 (22:32 +0200)]
libphobos: Fix struct layout of stat_t on sparc-*-solaris*

The last change to the bindings removed the st_pad3 field from the wrong
struct.  It should have been stat64_t that needed updating instead.

libphobos/ChangeLog

PR d/90719
* libdruntime/core/sys/posix/sys/stat.d (Solaris): Move st_pad3 from
struct stat64_t to stat32_t.

4 years agoDaily bump.
GCC Administrator [Sat, 16 May 2020 00:17:52 +0000 (00:17 +0000)]
Daily bump.

This page took 0.118762 seconds and 5 git commands to generate.