]> gcc.gnu.org Git - gcc.git/log
gcc.git
2 years agoDaily bump.
GCC Administrator [Fri, 21 Jan 2022 00:17:24 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: handle expansion of zero-sized array constructors
Harald Anlauf [Mon, 17 Jan 2022 21:52:08 +0000 (22:52 +0100)]
Fortran: handle expansion of zero-sized array constructors

gcc/fortran/ChangeLog:

PR fortran/103692
* array.c (gfc_expand_constructor): Handle zero-sized array
constructors.

gcc/testsuite/ChangeLog:

PR fortran/103692
* gfortran.dg/pr102520.f90: Adjust error messages.
* gfortran.dg/pr103692.f90: New test.

(cherry picked from commit 0d01a2722671bef37b931fd1f121e44b27e68268)

2 years agoDaily bump.
GCC Administrator [Thu, 20 Jan 2022 00:17:47 +0000 (00:17 +0000)]
Daily bump.

2 years agolibsanitizer: Cherry-pick LLVM release/13.x commit d96358a28193
H.J. Lu [Fri, 17 Dec 2021 19:08:32 +0000 (11:08 -0800)]
libsanitizer: Cherry-pick LLVM release/13.x commit d96358a28193

Cherry-pick from LLVM release/13.x branch:

commit d96358a2819399a2abb60ad3b26444ab7b4409cf
Author: Michał Górny <mgorny@moritz.systems>
Date:   Mon Dec 13 22:28:26 2021 +0100

    [compiler-rt] Increase kDlsymAllocPoolSize to fix test failures

    Increase kDlsymAllocPoolSize on the release branch as discussed on bug
    51620, as an alternative to backporting
    cb0e14ce6dcdd614a7207f4ce6fcf81a164471ab and its dependencies.
    The minimum size is 8192, as needed for the following test to pass:

      AddressSanitizer-i386-linux :: TestCases/Linux/long-object-path.cpp

    Fixes #51620

PR sanitizer/102911
* asan/asan_malloc_linux.cpp (kDlsymAllocPoolSize): Set it to
8192 on Linux.

(cherry picked from commit 8c0f58cd71ec3afcce5abf10c750ec494e88232b)

2 years ago[Ada] Set target_cpu to x32 for x86_64-linux-gnux32
H.J. Lu [Tue, 18 Jan 2022 23:54:35 +0000 (15:54 -0800)]
[Ada] Set target_cpu to x32 for x86_64-linux-gnux32

Since the x86_64-linux-gnux32 compiler is actually an x32 compiler, set
target_cpu to x32 for x86_64-linux-gnux32.

PR ada/103538
* gcc-interface/Makefile.in (target_cpu): Set to x32 for
x86_64-linux-gnux32.

(cherry picked from commit 2cef99175af1ad95283d4b35bced73c3a510f6d6)

2 years ago[Ada] Compile s-mmap and 128bit on x86_64-linux-gnux32
H.J. Lu [Tue, 18 Jan 2022 16:57:37 +0000 (08:57 -0800)]
[Ada] Compile s-mmap and 128bit on x86_64-linux-gnux32

PR ada/103538
* Makefile.rtl (LIBGNAT_TARGET_PAIRS): Add
$(TRASYM_DWARF_UNIX_PAIRS),
s-tsmona.adb<libgnat/s-tsmona__linux.adb,
$(GNATRTL_128BIT_PAIRS).
(EXTRA_GNATRTL_NONTASKING_OBJS): Add $(TRASYM_DWARF_UNIX_OBJS)
and $(GNATRTL_128BIT_OBJS).

(cherry picked from commit 9d6c63ba490ec92245f04b5cbafc56abd28e8d22)

2 years agogit scripts: sync from master.
Martin Liska [Wed, 19 Jan 2022 08:13:28 +0000 (09:13 +0100)]
git scripts: sync from master.

contrib/ChangeLog:

* git-backport.py: Sync from master.
* git-commit-mklog.py: Likewise.
* git-fix-changelog.py: New file.

2 years agoDaily bump.
GCC Administrator [Wed, 19 Jan 2022 00:17:21 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 18 Jan 2022 00:17:43 +0000 (00:17 +0000)]
Daily bump.

2 years agogit-backport: support renamed .cc files in commit message.
Martin Liska [Wed, 12 Jan 2022 15:35:41 +0000 (16:35 +0100)]
git-backport: support renamed .cc files in commit message.

The change can automatically update names for *.cc files that
are part of a backport.

contrib/ChangeLog:

* git-backport.py: Support renaming of .cc files.

(cherry picked from commit 938ea06c5e9e06a4c81965fcabc36d2da5e2f868)

2 years agoDaily bump.
GCC Administrator [Mon, 17 Jan 2022 00:17:16 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 16 Jan 2022 00:17:22 +0000 (00:17 +0000)]
Daily bump.

2 years agors6000: MMA test case emits wrong code when building a vector pair [PR102976]
Peter Bergner [Tue, 16 Nov 2021 18:14:22 +0000 (12:14 -0600)]
rs6000: MMA test case emits wrong code when building a vector pair [PR102976]

PR102976 shows a test case where we generate wrong code when building
a vector pair from 2 vector registers.  The bug here is that with unlucky
register assignments, we can clobber one of the input operands before
we write both registers of the output operand.  The solution is to use
early-clobbers in the assemble pair and accumulator patterns.

2021-11-16  Peter Bergner  <bergner@linux.ibm.com>

gcc/
PR target/102976
* config/rs6000/mma.md (*vsx_assemble_pair): Add early-clobber for
output operand.
(*mma_assemble_acc): Likewise.

gcc/testsuite/
PR target/102976
* gcc.target/powerpc/pr102976.c: New test.

(cherry picked from commit 4cdf7db9a39d18bd536d816a5751d4d3cf23808b)

2 years agors6000: Add unspec wrapper to vsx_assemble_pair
Peter Bergner [Sat, 15 Jan 2022 03:41:03 +0000 (21:41 -0600)]
rs6000: Add unspec wrapper to vsx_assemble_pair

This backports the trunk handling of vsx_assemble_pair with a unspec
wrapper and splits it late (split2).

2022-01-14  Peter Bergner  <bergner@linux.ibm.com>

gcc/
* config/rs6000/mma.md (UNSPEC_VSX_ASSEMBLE): New unspec.
(vsx_assemble_pair): Use mma_assemble_input_operand.
Expand into UNSPEC_VSX_ASSEMBLE wrapper.
(*vsx_assemble_pair): New define_insn_and_split.
* config/rs6000/rs6000.c (rs6000_split_multireg_move): Handle
UNSPEC_VSX_ASSEMBLE.

2 years agors6000: Disable optimizing multiple xxsetaccz instructions into one xxsetaccz
Peter Bergner [Tue, 14 Sep 2021 15:47:18 +0000 (10:47 -0500)]
rs6000: Disable optimizing multiple xxsetaccz instructions into one xxsetaccz

Fwprop will happily optimize two xxsetaccz instructions into one xxsetaccz
by propagating the results of the first to the uses of the second.
We really don't want that to happen given the late priming/depriming of
accumulators.  I fixed this by making the xxsetaccz source operand an
unspec volatile.  I also removed the mma_xxsetaccz define_expand and
define_insn_and_split and replaced it with a simple define_insn.

Rather than a new test case, I was able to just modify the current test case
to add another __builtin_mma_xxsetaccz call which shows the bad code gen
with unpatched compilers.

2021-09-14  Peter Bergner  <bergner@linux.ibm.com>

gcc/
* config/rs6000/mma.md (unspecv): Add UNSPECV_MMA_XXSETACCZ.
(*movpxi): Remove 'O' alternative.
(mma_xxsetaccz): Change to define_insn.  Use UNSPECV_MMA_XXSETACCZ.
Add comment.
* config/rs6000/rs6000.c (rs6000_rtx_costs): Handle UNSPEC_VOLATILE.

gcc/testsuite/
* gcc.target/powerpc/mma-builtin-6.c: Add second call to xxsetacc
built-in.  Update instruction counts.

(cherry picked from commit f80b9be083e0e7d49e7744b7e531b9aa52acd563)

2 years agoDaily bump.
GCC Administrator [Sat, 15 Jan 2022 00:17:19 +0000 (00:17 +0000)]
Daily bump.

2 years agoFix reverse scalar storage order issues in IPA-SRA
Eric Botcazou [Fri, 14 Jan 2022 18:49:21 +0000 (19:49 +0100)]
Fix reverse scalar storage order issues in IPA-SRA

The IPA-SRA pass introduced in GCC 10 does not always play nice with the
reverse scalar storage order that can be used in structures/records/unions.
Reading the code, the pass apparently correctly detects it but fails to
propagate the information to the rewriting phase in some cases and, in
particular, does not stream it for LTO.

gcc/
* ipa-param-manipulation.c (ipa_dump_adjusted_parameters): Dump
reverse flag as "reverse" for the sake of consistency.
* ipa-sra.c: Fix copyright year.
(ipa_sra_function_summaries::duplicate): Copy the reverse flag.
(dump_isra_access): Tweak dump line.
(isra_write_node_summary): Write the reverse flag.
(isra_read_node_info): Read it.
(pull_accesses_from_callee): Test its consistency and copy it.

gcc/testsuite/
* gnat.dg/lto25.adb: New test.
* gnat.dg/opt96.adb: Likewise.
* gnat.dg/opt96_pkg.ads, gnat.dg/opt96_pkg.adb: New helper.

2 years agoDaily bump.
GCC Administrator [Fri, 14 Jan 2022 00:17:19 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: avoid several NULL pointer dereferences during error recovery
Harald Anlauf [Mon, 27 Dec 2021 22:06:18 +0000 (23:06 +0100)]
Fortran: avoid several NULL pointer dereferences during error recovery

gcc/fortran/ChangeLog:

PR fortran/102332
* expr.c (gfc_get_variable_expr): Avoid NULL pointer dereferences
during handling of errors with invalid uses of CLASS variables.
* match.c (select_type_set_tmp): Likewise.
* primary.c (gfc_match_varspec): Likewise.
* resolve.c (resolve_variable): Likewise.
(resolve_select_type): Likewise.

gcc/testsuite/ChangeLog:

PR fortran/102332
* gfortran.dg/pr102332.f90: New test.

(cherry picked from commit d8f6c48ccb85ecc0d97a84c32b7a1b8f43c64fe4)

2 years agoDaily bump.
GCC Administrator [Thu, 13 Jan 2022 00:17:13 +0000 (00:17 +0000)]
Daily bump.

2 years agotree-optimization/97953 - fix bougs range recorded by EVRP
Richard Biener [Thu, 26 Nov 2020 15:13:08 +0000 (16:13 +0100)]
tree-optimization/97953 - fix bougs range recorded by EVRP

EVRP records some ranges from asserts into SSA_NAME_RANGE_INFO
but fails to assert that the condition the range is derived from
is always true after the SSA names definition.  The patch implements
the simplest post-dominance check, basic-block equality.

2020-11-26  Richard Biener  <rguenther@suse.de>

PR tree-optimization/97953
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::record_ranges_from_incoming_edge): Make
sure the condition post-dominates the SSA definition before
recording into SSA_NAME_RANGE_INFO.

* gcc.dg/pr97953.c: New testcase.

(cherry picked from commit c76b3f9e83353a4cd437ca137c1fb835c9b5c21f)

2 years agoDaily bump.
GCC Administrator [Wed, 12 Jan 2022 00:17:22 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 11 Jan 2022 00:17:51 +0000 (00:17 +0000)]
Daily bump.

2 years agoProperly enable -freorder-blocks-and-partition on 64-bit Windows
Eric Botcazou [Mon, 10 Jan 2022 11:40:10 +0000 (12:40 +0100)]
Properly enable -freorder-blocks-and-partition on 64-bit Windows

The PR uncovered that -freorder-blocks-and-partition was working by accident
on 64-bit Windows, i.e. the middle-end was supposed to disable it with SEH.
After the change installed on mainline, the middle-end properly disables it,
which is too bad since a significant amount of work went into it for SEH.

gcc/
PR target/103465
* coretypes.h (unwind_info_type): Swap UI_SEH and UI_TARGET.

2 years agoDaily bump.
GCC Administrator [Mon, 10 Jan 2022 00:17:25 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 9 Jan 2022 00:17:19 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 8 Jan 2022 00:17:21 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: fix passing return value to class(*) dummy argument
Harald Anlauf [Sun, 23 May 2021 18:51:14 +0000 (20:51 +0200)]
Fortran: fix passing return value to class(*) dummy argument

gcc/fortran/ChangeLog:

PR fortran/100551
* trans-expr.c (gfc_conv_procedure_call): Adjust check for
implicit conversion of actual argument to an unlimited polymorphic
procedure argument.

gcc/testsuite/ChangeLog:

PR fortran/100551
* gfortran.dg/pr100551.f90: New test.

(cherry picked from commit fe03f4fc9548b3fdbff3c8284a994feaa7d6307d)

2 years agoDaily bump.
GCC Administrator [Fri, 7 Jan 2022 00:17:18 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 6 Jan 2022 00:17:23 +0000 (00:17 +0000)]
Daily bump.

2 years agolibstdc++: Fix std::char_traits<C>::move for constexpr
Jonathan Wakely [Thu, 18 Nov 2021 12:39:20 +0000 (12:39 +0000)]
libstdc++: Fix std::char_traits<C>::move for constexpr

The constexpr branch in __gnu_cxx::char_traits::move compares the string
arguments to see if they overlap, but relational comparisons between
unrelated pointers are not core constant expressions.

I want to replace the comparisons with a loop using pointer equality to
determine whether the end of the source string is in the destination
string. However, that doesn't work with GCC, due to PR c++/89074 so
allocate a temporary buffer instead and copy out into that first, so
that overlapping source and destination don't matter. The allocation
isn't supported by the current Intel icc so use the loop as a fallback.

libstdc++-v3/ChangeLog:

* include/bits/char_traits.h (__gnu_cxx::char_traits::move):
Do not compare unrelated pointers during constant evaluation.
* testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
Improve tests for char_traits::move.

(cherry picked from commit ca243ada71656651a8753e88164a1f0f019be1c3)

2 years agolibstdc++: Fix example preprocessor command in FAQ [PR103877]
Jonathan Wakely [Tue, 4 Jan 2022 15:54:16 +0000 (15:54 +0000)]
libstdc++: Fix example preprocessor command in FAQ [PR103877]

libstdc++-v3/ChangeLog:

PR libstdc++/103877
* doc/xml/faq.xml: Add '-x c++' to preprocessor command.
* doc/html/faq.html: Regenerate.

(cherry picked from commit cebe875f6f44b905a0d56a2007b5a638a33a893c)

2 years agolibstdc++: Initialize member in std::match_results [PR103549]
Jonathan Wakely [Sat, 4 Dec 2021 11:38:25 +0000 (11:38 +0000)]
libstdc++: Initialize member in std::match_results [PR103549]

This fixes a -Wuninitialized warning for std::cmatch m1, m2; m1=m2;

Also name the template parameters in the forward declaration, to get rid
of the <template-parameter-1-1> noise in diagnostics.

libstdc++-v3/ChangeLog:

PR libstdc++/103549
* include/bits/regex.h (match_results): Give names to template
parameters in first declaration.
(match_results::_M_begin): Add default member-initializer.

(cherry picked from commit 87710ec7b213245ecb194b778e97ae3a6790394f)

2 years agolibstdc++: Make Asan detection work for Clang [PR103453]
Jonathan Wakely [Tue, 30 Nov 2021 13:14:38 +0000 (13:14 +0000)]
libstdc++: Make Asan detection work for Clang [PR103453]

Clang doesn't define __SANITIZE_ADDRESS__ so use its __has_feature check
to detect Asan instead.

libstdc++-v3/ChangeLog:

PR libstdc++/103453
* config/allocator/malloc_allocator_base.h
(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Define for Clang.
* config/allocator/new_allocator_base.h
(_GLIBCXX_SANITIZE_STD_ALLOCATOR): Likewise.

(cherry picked from commit cca6090b13ab503bef1cfa327e2d107789d6bd30)

2 years agolibstdc++: Fix std::error_code pretty printer for versioned namespace
Jonathan Wakely [Wed, 5 Jan 2022 14:06:43 +0000 (14:06 +0000)]
libstdc++: Fix std::error_code pretty printer for versioned namespace

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
versioned namespace from the type name that is printed.

(cherry picked from commit 1918067e2d0d79ccaf1e4ed98096060fc235e772)

2 years agolibstdc++: Fix std::allocator<void> for versioned namespace
Jonathan Wakely [Sat, 28 Aug 2021 10:05:58 +0000 (11:05 +0100)]
libstdc++: Fix std::allocator<void> for versioned namespace

Removing the allocator<void> specialization for the versioned namespace
breaks _Extptr_allocator<void> because the allocator<void>
specialization was still declared in <bits/memoryfwd.h>, making it an
incomplete type.  It wrong to remove that specialization anyway, because
it is still needed pre-C++20.

This removes the #if ! _GLIBCXX_INLINE_VERSION check, so that
allocator<void> is still explicitly specialized for the versioned
namespace, consistent with the normal unversioned namespace mode.

To make _Extptr_allocator<void> usable as a ProtoAllocator, this change
adds a default constructor and converting constructor. That is
consistent with std::allocator<void> since C++20 (and harmless to do for
earlier standards).

I'm also explicitly specializing allocator_traits<allocator<void>> so
that it doesn't need to use allocator<void>::construct and destroy.
Doing that allows those members to be removed, further simplifying
allocator<void>.  That new explicit specialization can delete the
allocate, deallocate and max_size members, which are always ill-formed
for allocator<void>.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

* include/bits/alloc_traits.h (allocator_traits): Add explicit
specialization for allocator<void>. Improve doxygen comments.
* include/bits/allocator.h (allocator<void>): Restore for the
versioned namespace.
(allocator<void>::construct, allocator<void>::destroy): Remove.
* include/ext/extptr_allocator.h (_Extptr_allocator<void>):
Add default constructor and converting constructor.

(cherry picked from commit 754fca77e82a59d85c735a5aff49ee2b1ec4c6df)

2 years agolibstdc++: Add another testcase for std::unique_ptr printer [PR103086]
Jonathan Wakely [Tue, 23 Nov 2021 21:35:40 +0000 (21:35 +0000)]
libstdc++: Add another testcase for std::unique_ptr printer [PR103086]

libstdc++-v3/ChangeLog:

PR libstdc++/103086
* testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr
with non-empty pointer and non-empty deleter.

(cherry picked from commit c59ec55c3459fba619e05ee7f59480b71e85ffd7)

2 years agolibstdc++: Fix pretty printing of std::unique_ptr [PR103086]
Jonathan Wakely [Thu, 4 Nov 2021 22:50:02 +0000 (22:50 +0000)]
libstdc++: Fix pretty printing of std::unique_ptr [PR103086]

Since std::tuple started using [[no_unique_address]] the tuple<T*, D>
member of std::unique_ptr<T, D> has two _M_head_impl subobjects, in
different base classes. That means this printer code is ambiguous:

    tuple_head_type = tuple_impl_type.fields()[1].type   # _Head_base
    head_field = tuple_head_type.fields()[0]
    if head_field.name == '_M_head_impl':
        self.pointer = tuple_member['_M_head_impl']

In older versions of GDB it happened to work by chance, because GDB
returned the last _M_head_impl member and std::tuple's base classes are
stored in reverse order, so the last one was the T* element of the
tuple. Since GDB 11 it returns the first _M_head_impl, which is the
deleter element.

The fix is for the printer to stop using an ambiguous field name and
cast the tuple to the correct base class before accessing the
_M_head_impl member.

Instead of fixing this in both UniquePointerPrinter and StdPathPrinter a
new unique_ptr_get function is defined to do it correctly. That is
defined in terms of new tuple_get and _tuple_impl_get functions.

It would be possible to reuse _tuple_impl_get to access each element in
StdTuplePrinter._iterator.__next__, but that already does the correct
casting, and wouldn't be much simpler anyway.

libstdc++-v3/ChangeLog:

PR libstdc++/103086
* python/libstdcxx/v6/printers.py (_tuple_impl_get): New helper
for accessing the tuple element stored in a _Tuple_impl node.
(tuple_get): New function for accessing a tuple element.
(unique_ptr_get): New function for accessing a unique_ptr.
(UniquePointerPrinter, StdPathPrinter): Use unique_ptr_get.
* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker): Cast
tuple to its base class before accessing _M_head_impl.

(cherry picked from commit a634928f5c8a281442ac8f5fb1636aed048ed72c)

2 years agoDaily bump.
GCC Administrator [Wed, 5 Jan 2022 00:17:50 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 4 Jan 2022 00:17:29 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 3 Jan 2022 00:17:18 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 2 Jan 2022 00:17:17 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 1 Jan 2022 00:17:14 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 31 Dec 2021 00:17:18 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 30 Dec 2021 00:17:32 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 29 Dec 2021 00:17:22 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 28 Dec 2021 00:17:27 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: fix check for pointer dummy arguments with INTENT(IN)
Harald Anlauf [Thu, 9 Dec 2021 21:57:13 +0000 (22:57 +0100)]
Fortran: fix check for pointer dummy arguments with INTENT(IN)

gcc/fortran/ChangeLog:

PR fortran/103418
* check.c (variable_check): Replace previous check of procedure
dummy arguments with INTENT(IN) attribute when passed to intrinsic
procedures by gfc_check_vardef_context.
* expr.c (gfc_check_vardef_context): Correct check of INTENT(IN)
dummy arguments for the case of sub-components of a CLASS pointer.

gcc/testsuite/ChangeLog:

PR fortran/103418
* gfortran.dg/move_alloc_8.f90: Adjust error messages.
* gfortran.dg/pointer_intent_9.f90: New test.

(cherry picked from commit bb6a1ebb8585b85879735d0d6df9535885fad165)

2 years agoFortran: PACK intrinsic should not try to read from zero-sized array
Harald Anlauf [Mon, 13 Dec 2021 19:50:19 +0000 (20:50 +0100)]
Fortran: PACK intrinsic should not try to read from zero-sized array

libgfortran/ChangeLog:

PR libfortran/103634
* intrinsics/pack_generic.c (pack_internal): Handle case when the
array argument of PACK has one or more extents of size zero to
avoid invalid reads.

gcc/testsuite/ChangeLog:

PR libfortran/103634
* gfortran.dg/intrinsic_pack_6.f90: New test.

(cherry picked from commit 1c613165a55b212c59a83796b20a1d555e096504)

2 years agoFortran: BOZ literal constants are not interoperable
Harald Anlauf [Mon, 20 Dec 2021 21:12:33 +0000 (22:12 +0100)]
Fortran: BOZ literal constants are not interoperable

gcc/fortran/ChangeLog:

PR fortran/103778
* check.c (is_c_interoperable): A BOZ literal constant is not
interoperable.

gcc/testsuite/ChangeLog:

PR fortran/103778
* gfortran.dg/illegal_boz_arg_3.f90: New test.

(cherry picked from commit ff0ad4b5e16b8828a6147ae2d5fec8068ef0778e)

2 years agoFortran: NULL() is not interoperable
Harald Anlauf [Wed, 17 Nov 2021 21:21:24 +0000 (22:21 +0100)]
Fortran: NULL() is not interoperable

gcc/fortran/ChangeLog:

PR fortran/101329
* check.c (is_c_interoperable): Reject NULL() as it is not
interoperable.

gcc/testsuite/ChangeLog:

PR fortran/101329
* gfortran.dg/pr101329.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit 3535be6c6f440909798d1c78e862a657f7adaf63)

2 years agoDaily bump.
GCC Administrator [Mon, 27 Dec 2021 00:17:16 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 26 Dec 2021 00:17:09 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 25 Dec 2021 00:17:20 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 24 Dec 2021 00:17:38 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 23 Dec 2021 00:17:16 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 22 Dec 2021 00:17:22 +0000 (00:17 +0000)]
Daily bump.

2 years agolibphobos: Fix definition of stat_t for MIPS64 (PR103604)
Iain Buclaw [Tue, 21 Dec 2021 13:07:37 +0000 (14:07 +0100)]
libphobos: Fix definition of stat_t for MIPS64 (PR103604)

Backported specific change from commit r12-6003.

libphobos/ChangeLog:

PR d/103604
* libdruntime/core/sys/posix/sys/stat.d (struct stat_t): Fix
definition for MIPS64.

(cherry picked from commit 96a09dec2421af3e201f5a54dadb35f00917ea5b)

2 years agoDaily bump.
GCC Administrator [Tue, 21 Dec 2021 00:17:11 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 20 Dec 2021 00:17:18 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: catch failed simplification of bad stride expression
Harald Anlauf [Tue, 7 Dec 2021 17:46:52 +0000 (18:46 +0100)]
Fortran: catch failed simplification of bad stride expression

gcc/fortran/ChangeLog:

PR fortran/103588
* array.c (gfc_ref_dimen_size): Do not generate internal error on
failed simplification of stride expression; just return failure.

gcc/testsuite/ChangeLog:

PR fortran/103588
* gfortran.dg/pr103588.f90: New test.

(cherry picked from commit 652c28736209f10bac1aa7ecb31f9056b518dacf)

2 years agoFortran: improve checking of array specifications
Harald Anlauf [Thu, 2 Dec 2021 21:33:49 +0000 (22:33 +0100)]
Fortran: improve checking of array specifications

gcc/fortran/ChangeLog:

PR fortran/103505
* array.c (match_array_element_spec): Try to simplify array
element specifications to improve early checking.
* expr.c (gfc_try_simplify_expr): New.  Try simplification of an
expression via gfc_simplify_expr.  When an error occurs, roll
back.
* gfortran.h (gfc_try_simplify_expr): Declare it.

gcc/testsuite/ChangeLog:

PR fortran/103505
* gfortran.dg/pr103505.f90: New test.

Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
(cherry picked from commit f46d32dd29b7623915e31b0508e2e925526fa7d8)

2 years agoFortran: reject BOZ type argument to SIZEOF().
Harald Anlauf [Sat, 18 Dec 2021 22:21:35 +0000 (23:21 +0100)]
Fortran: reject BOZ type argument to SIZEOF().

gcc/fortran/ChangeLog:

PR fortran/103412
* check.c (gfc_check_sizeof): Reject BOZ type argument.

gcc/testsuite/ChangeLog:

PR fortran/103412
* gfortran.dg/illegal_boz_arg_2.f90: New test.

(cherry picked from commit fd74a2ee40456a1d1621e88738f8e57536194080)

2 years agoDaily bump.
GCC Administrator [Sun, 19 Dec 2021 00:17:11 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 18 Dec 2021 00:17:13 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: dimensions of an array have to be non-negative
Harald Anlauf [Tue, 7 Dec 2021 22:06:41 +0000 (23:06 +0100)]
Fortran: dimensions of an array have to be non-negative

gcc/fortran/ChangeLog:

PR fortran/103610
* array.c (spec_dimen_size): Fix simplification of SHAPE:
dimensions must be non-negative.

gcc/testsuite/ChangeLog:

PR fortran/103610
* gfortran.dg/shape_11.f90: New test.

(cherry picked from commit 5f7cdea34e118776d0ccd2ff3dda0f5acab18a94)

2 years agoDaily bump.
GCC Administrator [Fri, 17 Dec 2021 00:17:18 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: fix checking of elemental functions of type CLASS
Harald Anlauf [Fri, 10 Dec 2021 21:41:24 +0000 (22:41 +0100)]
Fortran: fix checking of elemental functions of type CLASS

gcc/fortran/ChangeLog:

PR fortran/103606
* resolve.c (resolve_fl_procedure): Do not access CLASS components
before class container has been built.

gcc/testsuite/ChangeLog:

PR fortran/103606
* gfortran.dg/pr103606.f90: New test.

(cherry picked from commit 7e913caad081ea85da4f257265f2d3383cdbe8d5)

2 years agoFortran: prevent NULL pointer dereference in check of passed do-loop variable
Harald Anlauf [Tue, 14 Dec 2021 20:57:04 +0000 (21:57 +0100)]
Fortran: prevent NULL pointer dereference in check of passed do-loop variable

gcc/fortran/ChangeLog:

PR fortran/103717
* frontend-passes.c (doloop_code): Prevent NULL pointer
dereference when checking for passing a do-loop variable to a
contained procedure with an interface mismatch.

gcc/testsuite/ChangeLog:

PR fortran/103717
* gfortran.dg/do_check_19.f90: New test.

(cherry picked from commit ca39102e10643a6b3f07d06934cc0907ba83d9ee)

2 years agomh-mingw: Set __USE_MINGW_ACCESS in missed C++ flags variables
Martin Storsjö [Fri, 9 Apr 2021 11:46:36 +0000 (14:46 +0300)]
mh-mingw: Set __USE_MINGW_ACCESS in missed C++ flags variables

This is similar to what was done in
eea4e2ff0a3f5e7f37df204c070cc5d9ef339e6e (where it was added to
STAGE*_CXXFLAGS), but this adds the flag to the CXXFLAGS and
BOOT_CXXFLAGS variables too (as it's already added to CFLAGS and
BOOT_CFLAGS).

2021-04-09  Martin Storsjö  <martin@martin.st>

config/ChangeLog:
* mh-mingw: Set __USE_MINGW_ACCESS in missed C++ flags
variables

(cherry picked from commit 89e95ad2e7679322b2f5ee9070ff2721d5ca1d6d)

2 years agoi386: Fix emissing of __builtin_cpu_supports.
Martin Liska [Mon, 13 Dec 2021 14:34:30 +0000 (15:34 +0100)]
i386: Fix emissing of __builtin_cpu_supports.

PR target/103661

gcc/ChangeLog:

* config/i386/i386-builtins.c (fold_builtin_cpu): Compare to 0
as API expects that non-zero values are returned (do that
it mask == 31).
For "avx512vbmi2" argument, we return now 1 << 31, which is a
negative integer value.

(cherry picked from commit 127c7178d5ec502d95862fd823537cbca1a0cb99)

2 years agoDaily bump.
GCC Administrator [Thu, 16 Dec 2021 00:17:17 +0000 (00:17 +0000)]
Daily bump.

2 years agors6000: Remove builtin mask check from builtin_decl [PR102347]
Kewen Lin [Tue, 30 Nov 2021 03:22:32 +0000 (21:22 -0600)]
rs6000: Remove builtin mask check from builtin_decl [PR102347]

As the discussion in PR102347, currently builtin_decl is invoked so
early, it's when making up the function_decl for builtin functions,
at that time the rs6000_builtin_mask could be wrong for those
builtins sitting in #pragma/attribute target functions, though it
will be updated properly later when LTO processes all nodes.

This patch is to align with the practice i386 port adopts, also
align with r10-7462 by relaxing builtin mask checking in some places.

gcc/ChangeLog:

PR target/102347
* config/rs6000/rs6000-call.c (rs6000_builtin_decl): Remove builtin mask
check.

gcc/testsuite/ChangeLog:

PR target/102347
* gcc.target/powerpc/pr102347.c: New test.

(cherry picked from commit 6c7d489a1e6592bc73db03678c1231748fd7a126)

2 years agoDaily bump.
GCC Administrator [Wed, 15 Dec 2021 00:17:19 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 14 Dec 2021 00:17:15 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 13 Dec 2021 00:17:11 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 12 Dec 2021 00:17:37 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: improve expansion of constant array expressions within constructors
Harald Anlauf [Sat, 27 Nov 2021 20:43:52 +0000 (21:43 +0100)]
Fortran: improve expansion of constant array expressions within constructors

gcc/fortran/ChangeLog:

PR fortran/102787
* array.c (expand_constructor): When encountering a constant array
expression or array section within a constructor, simplify it to
enable better expansion.

gcc/testsuite/ChangeLog:

* gfortran.dg/array_constructor_54.f90: New test.

(cherry picked from commit 6b8ecbc6d6652d061d7c72c64352d51eca2df6ca)

2 years agoFortran: generate error message for negative elements in SHAPE array
Harald Anlauf [Thu, 14 Oct 2021 18:19:50 +0000 (20:19 +0200)]
Fortran: generate error message for negative elements in SHAPE array

gcc/fortran/ChangeLog:

PR fortran/102717
* simplify.c (gfc_simplify_reshape): Replace assert by error
message for negative elements in SHAPE array.

gcc/testsuite/ChangeLog:

PR fortran/102717
* gfortran.dg/reshape_shape_2.f90: New test.

(cherry picked from commit b47490c572c5938f887b54240af6096a7c90f640)

2 years agoFortran: improve check of arguments to the RESHAPE intrinsic
Harald Anlauf [Fri, 26 Nov 2021 20:00:35 +0000 (21:00 +0100)]
Fortran: improve check of arguments to the RESHAPE intrinsic

gcc/fortran/ChangeLog:

PR fortran/103411
* check.c (gfc_check_reshape): Improve check of size of source
array for the RESHAPE intrinsic against the given shape when pad
is not given, and shape is a parameter.  Try other simplifications
of shape.

gcc/testsuite/ChangeLog:

PR fortran/103411
* gfortran.dg/pr68153.f90: Adjust test to improved check.
* gfortran.dg/reshape_7.f90: Likewise.
* gfortran.dg/reshape_9.f90: New test.

(cherry picked from commit 4d540c7a4a7fb87b04d06e1ee7f9b004116279a4)

2 years agoDaily bump.
GCC Administrator [Sat, 11 Dec 2021 00:17:17 +0000 (00:17 +0000)]
Daily bump.

2 years agoFortran: perform array subscript checks only for valid INTEGER bounds
Harald Anlauf [Tue, 7 Dec 2021 20:34:31 +0000 (21:34 +0100)]
Fortran: perform array subscript checks only for valid INTEGER bounds

gcc/fortran/ChangeLog:

PR fortran/103607
* frontend-passes.c (do_subscript): Ensure that array bounds are
of type INTEGER before performing checks on array subscripts.

gcc/testsuite/ChangeLog:

PR fortran/103607
* gfortran.dg/pr103607.f90: New test.

(cherry picked from commit 9eec77c0df9e5c67454a2e8f83246104458ba4f0)

2 years agod: Align methods to MINIMUM_METHOD_BOUNDARY.
Iain Buclaw [Fri, 10 Dec 2021 00:30:19 +0000 (01:30 +0100)]
d: Align methods to MINIMUM_METHOD_BOUNDARY.

Aligns all D defined methods to MINIMUM_METHOD_BOUNDARY, improving
interoperability with C++ methods.

gcc/d/ChangeLog:

* decl.cc (get_symbol_decl): Align methods to MINIMUM_METHOD_BOUNDARY.

(cherry picked from commit 213b7d9cf76d73f7b716a6f9119971cb65bd85e2)

2 years agoDaily bump.
GCC Administrator [Fri, 10 Dec 2021 00:17:13 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 9 Dec 2021 00:17:15 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 8 Dec 2021 00:17:13 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 7 Dec 2021 00:17:15 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 6 Dec 2021 00:17:11 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 5 Dec 2021 00:17:17 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 4 Dec 2021 00:17:48 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 3 Dec 2021 00:17:51 +0000 (00:17 +0000)]
Daily bump.

2 years agolibphobos: Push all callee-save registers on the stack before GC scan
Iain Buclaw [Thu, 2 Dec 2021 00:53:51 +0000 (01:53 +0100)]
libphobos: Push all callee-save registers on the stack before GC scan

This is the library fix for PR103520 that also prevents the garbage
collector from releasing live memory.  However this requires that the
host compiler has been patched with this fix, so the GC will remain
disabled in the D front-end for now until enough time has passed for
this to have trickled down into enough releases.

libphobos/ChangeLog:

* libdruntime/core/thread.d (callWithStackShell): Push all callee-save
registers on the stack using inline assembly.

(cherry picked from commit 2fb6a57f9ffa9ac964931b439b6d1600a698e377)

2 years agoDaily bump.
GCC Administrator [Thu, 2 Dec 2021 00:17:16 +0000 (00:17 +0000)]
Daily bump.

2 years agoipa-sra: Check also ECF_LOOPING_CONST_OR_PURE when evaluating calls
Martin Jambor [Wed, 1 Dec 2021 13:25:16 +0000 (14:25 +0100)]
ipa-sra: Check also ECF_LOOPING_CONST_OR_PURE when evaluating calls

in PR 103267 Honza found out that IPA-SRA does not look at
ECF_LOOPING_CONST_OR_PURE when evaluating if a call can have side
effects.  Fixed with this patch.  The testcase infinitely loops in a
const function, so it would not make a good addition to the testsuite.

gcc/ChangeLog:

2021-11-29  Martin Jambor  <mjambor@suse.cz>

PR ipa/103267
* ipa-sra.c (scan_function): Also check ECF_LOOPING_CONST_OR_PURE flag.

(cherry picked from commit e5440bc08e07fd491dcccd47e1b86a5985ee117c)

2 years agoDaily bump.
GCC Administrator [Wed, 1 Dec 2021 00:18:01 +0000 (00:18 +0000)]
Daily bump.

2 years agoFix -freorder-blocks-and-partition glitch with Windows SEH (continued)
Eric Botcazou [Tue, 30 Nov 2021 09:17:09 +0000 (10:17 +0100)]
Fix -freorder-blocks-and-partition glitch with Windows SEH (continued)

This fixes a thinko in the fix for the -freorder-blocks-and-partition
glitch with SEH on 64-bit Windows:
  https://gcc.gnu.org/pipermail/gcc-patches/2021-February/565208.html

Even if no exceptions are active, e.g. in C, we need to consider calls.

gcc/
PR target/103274
* config/i386/i386.c (ix86_output_call_insn): Beef up comment about
nops emitted with SEH.
* config/i386/winnt.c (i386_pe_seh_unwind_emit): When switching to
the cold section, emit a nop before the directive if the previous
active instruction is a call.

2 years agoDaily bump.
GCC Administrator [Tue, 30 Nov 2021 00:17:30 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 29 Nov 2021 00:17:23 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 28 Nov 2021 00:17:12 +0000 (00:17 +0000)]
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 27 Nov 2021 00:17:25 +0000 (00:17 +0000)]
Daily bump.

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