]> gcc.gnu.org Git - gcc.git/log
gcc.git
3 years agod: Ensure casting from bool results in either 0 or 1 (PR96435)
Iain Buclaw [Mon, 26 Jul 2021 17:28:02 +0000 (19:28 +0200)]
d: Ensure casting from bool results in either 0 or 1 (PR96435)

If casting from bool, the result is either 0 or 1, any other value
violates @safe code, so enforce that it is never invalid.

PR d/96435

gcc/d/ChangeLog:

* d-convert.cc (convert_for_rvalue): New function.
* d-tree.h (convert_for_rvalue): Declare.
* expr.cc (ExprVisitor::visit (CastExp *)): Use convert_for_rvalue.
(build_return_dtor): Likewise.

gcc/testsuite/ChangeLog:

* gdc.dg/pr96435.d: New test.

(cherry picked from commit 5c9b7408dc578cb2ae142a5c1b724c183497bdb2)

3 years agoDaily bump.
GCC Administrator [Thu, 29 Jul 2021 00:19:18 +0000 (00:19 +0000)]
Daily bump.

3 years agod: Wrong evaluation order of binary expressions (PR101640)
Iain Buclaw [Tue, 27 Jul 2021 11:24:34 +0000 (13:24 +0200)]
d: Wrong evaluation order of binary expressions (PR101640)

The use of fold_build2 can in some cases swap the order of its operands
if that is the more optimal thing to do.  However this breaks semantic
guarantee of left-to-right evaluation in D.

PR d/101640

gcc/d/ChangeLog:

* expr.cc (binary_op): Use build2 instead of fold_build2.

gcc/testsuite/ChangeLog:

* gdc.dg/pr101640.d: New test.

(cherry picked from commit 54ec50bada94a8ff92edb04ee5216c27fa4bf942)

3 years agod: fix ICE at convert_expr(tree_node*, Type*, Type*) (PR101490)
Iain Buclaw [Mon, 26 Jul 2021 13:11:42 +0000 (15:11 +0200)]
d: fix ICE at convert_expr(tree_node*, Type*, Type*) (PR101490)

Both the front-end and code generator had a modulo by zero bug when testing if
a conversion from a static array to dynamic array was valid.

PR d/101490

gcc/d/ChangeLog:

* d-codegen.cc (build_array_index): Handle void arrays same as byte.
* d-convert.cc (convert_expr): Handle converting to zero-sized arrays.
* dmd/dcast.c (castTo): Handle casting to zero-sized arrays.

gcc/testsuite/ChangeLog:

* gdc.dg/pr101490.d: New test.
* gdc.test/fail_compilation/fail22144.d: New test.

(cherry picked from commit c936c39f86c74b3bfc6831f694b3165296c99dc0)

3 years agod: __FUNCTION__ doesn't work in core.stdc.stdio functions without cast (PR101441)
Iain Buclaw [Mon, 26 Jul 2021 13:24:12 +0000 (15:24 +0200)]
d: __FUNCTION__ doesn't work in core.stdc.stdio functions without cast (PR101441)

Backports fix from upstream to allow __FUNCTION__ and
__PRETTY_FUNCTION__ to be used as C string literals.

Reviewed-on: https://github.com/dlang/dmd/pull/12923

PR d/101441

gcc/d/ChangeLog:

* dmd/expression.c (FuncInitExp::resolveLoc): Set type as `string'.
(PrettyFuncInitExp::resolveLoc): Likewise.

gcc/testsuite/ChangeLog:

* gdc.test/compilable/b19002.d: New test.

(cherry picked from commit 1a2306ffe79df89389cc850ce85c586d0f1c8264)

3 years agod: Compile-time reflection for supported built-ins (PR101127)
Iain Buclaw [Sun, 25 Jul 2021 21:19:36 +0000 (23:19 +0200)]
d: Compile-time reflection for supported built-ins (PR101127)

In order to allow user-code to determine whether a back-end builtin is
available without error, LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE has been
defined to delay putting back-end builtin functions until the ISA that
defines them has been declared.

However in D, there is no global namespace.  All builtins get pushed
into the `gcc.builtins' module, which is constructed during the semantic
analysis pass, which has already finished by the time target attributes
are evaluated.  So builtins are not pushed by the new langhook because
they would be ultimately ignored.  Builtins exposed to D code then can
now only be altered by the command-line.

PR d/101127

gcc/d/ChangeLog:

* d-builtins.cc (d_builtin_function_ext_scope): New function.
* d-lang.cc (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): Define.
* d-tree.h (d_builtin_function_ext_scope): Declare.

gcc/testsuite/ChangeLog:

* gdc.dg/pr101127a.d: New test.
* gdc.dg/pr101127b.d: New test.

(cherry picked from commit b2f6e1de242fff5713763cd3146dcf3f9dee51ca)

3 years agoDaily bump.
GCC Administrator [Wed, 28 Jul 2021 00:18:45 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 27 Jul 2021 00:18:48 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 26 Jul 2021 00:18:49 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 25 Jul 2021 00:18:43 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 24 Jul 2021 00:19:07 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 23 Jul 2021 00:18:57 +0000 (00:18 +0000)]
Daily bump.

3 years agolibstdc++: Fix test failure in C++20 mode
Jonathan Wakely [Thu, 22 Jul 2021 21:26:30 +0000 (22:26 +0100)]
libstdc++: Fix test failure in C++20 mode

Because the container types are ambiguous in this test, the declarations
of the C++20 uniform container erasure function template produce
additional errors. They can be ignored.

libstdc++-v3/ChangeLog:

* testsuite/ext/profile/mutex_extensions_neg.cc: Prune
additional errors in C++20 mode.

3 years agolibstdc++: Move atomic functions to libsupc++ [PR 96657]
Jonathan Wakely [Wed, 14 Apr 2021 19:48:54 +0000 (20:48 +0100)]
libstdc++: Move atomic functions to libsupc++ [PR 96657]

The changes for PR libstdc++/64735 mean that libsupc++ function might
now depend on the __exchange_and_add and __atomic_add functions defined
in config/cpu/*/atomicity.h which is not compiled into libsupc++. This
causes a link failure for some targets when trying to use libsupc++
without the rest of libstdc++.

This patch simply moves the definitions of those functions into
libsupc++ so that they are available there.

libstdc++-v3/ChangeLog:

PR libstdc++/96657
* libsupc++/Makefile.am: Add atomicity.cc here.
* src/c++98/Makefile.am: Remove it from here.
* libsupc++/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* testsuite/18_support/exception_ptr/96657.cc: New test.

(cherry picked from commit 6c0c7fc6236470a533675cd3cd1ebb1cc3dd112c)

3 years agolibstdc++: Fix std::any constraints [PR101034]
Jonathan Wakely [Mon, 14 Jun 2021 13:18:33 +0000 (14:18 +0100)]
libstdc++: Fix std::any constraints [PR101034]

PR libstdc++/101034

libstdc++-v3/ChangeLog:

* include/std/any (any(in_place_t<T>, initializer_list<U>, A&&...))
(any::emplace<T>(initializer_list<U>, A&&...)): Fix constraint
to use lvalue.
* testsuite/20_util/any/cons/101034.cc: New test.

(cherry picked from commit 14f26c75d255ef05b706a12d25b003da8a2f5b45)

3 years agolibstdc++: Fix constructor constraints for std::any (PR 90415)
Jonathan Wakely [Thu, 23 Apr 2020 23:54:20 +0000 (00:54 +0100)]
libstdc++: Fix constructor constraints for std::any  (PR 90415)

This removes a non-standard extension to std::any which causes errors
for valid code, due to recursive instantiation of a trait that isn't
supposed to be in the constraints.

It also removes some incorrect constraints on the in_place_type<T>
constructors and emplace members, which were preventing creating a
std::any object with another std::any as the contained value.

2020-04-24  Kamlesh Kumar  <kamleshbhalui@gmail.com>
    Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/90415
PR libstdc++/92156
* include/std/any (any): Rename template parameters for consistency
with the standard.
(any::_Decay): Rename to _Decay_if_not_any.
(any::any(T&&)): Remove is_constructible from constraints. Remove
non-standard overload.
(any::any(in_place_type_t<T>, Args&&...))
(any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
(any::emplace(Args&&...))
(any::emplace(initializer_list<U>, Args&&...)):
Use decay_t instead of _Decay.
* testsuite/20_util/any/cons/90415.cc: New test.
* testsuite/20_util/any/cons/92156.cc: New Test.
* testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
more robust.
* testsuite/20_util/any/modifiers/92156.cc: New test.

(cherry picked from commit d1462b0782555354b4480e1f46498586d5882972)

3 years agolibstdc++: Fix constraint on std::optional assignment [PR 100982]
Jonathan Wakely [Wed, 9 Jun 2021 10:03:15 +0000 (11:03 +0100)]
libstdc++: Fix constraint on std::optional assignment [PR 100982]

libstdc++-v3/ChangeLog:

PR libstdc++/100982
* include/std/optional (optional::operator=(const optional<U>&)):
Fix value category used in is_assignable check.
* testsuite/20_util/optional/assignment/100982.cc: New test.

(cherry picked from commit b3fce1bd45f72cc9e55fb7431762e92e30fefcf1)

3 years agoDaily bump.
GCC Administrator [Thu, 22 Jul 2021 00:19:12 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 21 Jul 2021 00:19:15 +0000 (00:19 +0000)]
Daily bump.

3 years agoi386: Remove atomic_storedi_fpu and atomic_loaddi_fpu peepholes [PR100182]
Uros Bizjak [Tue, 20 Jul 2021 04:38:46 +0000 (06:38 +0200)]
i386: Remove atomic_storedi_fpu and atomic_loaddi_fpu peepholes [PR100182]

These patterns result in non-atomic sequence.

2021-07-21  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
PR target/100182
* config/i386/sync.md (define_peephole2 atomic_storedi_fpu):
Remove.
(define_peephole2 atomic_loaddi_fpu): Ditto.

gcc/testsuite/
PR target/100182
* gcc.target/i386/pr71245-1.c: Remove.
* gcc.target/i386/pr71245-2.c: Ditto.

3 years agoDaily bump.
GCC Administrator [Tue, 20 Jul 2021 00:19:01 +0000 (00:19 +0000)]
Daily bump.

3 years agors6000: Don't let swaps pass break multiply low-part (PR101129)
Bill Schmidt [Mon, 19 Jul 2021 21:14:36 +0000 (16:14 -0500)]
rs6000: Don't let swaps pass break multiply low-part (PR101129)

Backport from mainline.

2021-07-15  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
PR target/101129
* config/rs6000/rs6000-p8swap.c (has_part_mult): New.
(rs6000_analyze_swaps): Insns containing a subreg of a mult are
not swappable.

gcc/testsuite/
PR target/101129
* gcc.target/powerpc/pr101129.c: New.

3 years agocombine: Don't create REG_UNUSED notes if the reg already died (PR99927)
Segher Boessenkool [Sat, 17 Apr 2021 18:06:17 +0000 (18:06 +0000)]
combine: Don't create REG_UNUSED notes if the reg already died (PR99927)

If the register named in an existing REG_UNUSED note dies somewhere
between where the note used to be and I3, we should just drop it.

2021-04-21  Segher Boessenkool  <segher@kernel.crashing.org>

PR rtl-optimization/99927
* combine.c (distribute_notes) [REG_UNUSED]: If the register already
is dead, just drop it.

(cherry picked from commit b412ce8e961052e6becea3bc783a53e1d5feaa0f)

3 years agoDaily bump.
GCC Administrator [Mon, 19 Jul 2021 00:19:14 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 18 Jul 2021 00:18:42 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 17 Jul 2021 00:19:04 +0000 (00:19 +0000)]
Daily bump.

3 years agoFortran - ICE in gfc_conv_expr_present initializing non-dummy class variable
Harald Anlauf [Wed, 14 Jul 2021 15:25:29 +0000 (17:25 +0200)]
Fortran - ICE in gfc_conv_expr_present initializing non-dummy class variable

gcc/fortran/ChangeLog:

PR fortran/100949
* trans-expr.c (gfc_trans_class_init_assign): Call
gfc_conv_expr_present only for dummy variables.

gcc/testsuite/ChangeLog:

PR fortran/100949
* gfortran.dg/pr100949.f90: New test.

(cherry picked from commit 269ca408e2839d7f3554a91515d73d4d95352f68)

3 years agoDaily bump.
GCC Administrator [Fri, 16 Jul 2021 00:18:46 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 15 Jul 2021 00:19:17 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 14 Jul 2021 00:19:12 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 13 Jul 2021 00:19:04 +0000 (00:19 +0000)]
Daily bump.

3 years agoDo not replace variable op variable in I/O implied DO loop replacement.
Thomas Koenig [Tue, 6 Jul 2021 05:04:09 +0000 (07:04 +0200)]
Do not replace variable op variable in I/O implied DO loop replacement.

This PR came about because index expressions of the form k+k in
implied DO loops in I/O statements were considered for replacement
by array slices.

Fixed by only doing the transformation if the expression is of the
type expr OP contastant.

gcc/fortran/ChangeLog:

PR fortran/100227
* frontend-passes.c (traverse_io_block): Adjust test for
when a variable is eligible for the transformation to
array slice.

gcc/testsuite/ChangeLog:

PR fortran/100227
* gfortran.dg/implied_do_io_7.f90: New test.

(cherry picked from commit d7e3855d5dd8c001bb65dc7da1cda0249bfc2986)

3 years agoDaily bump.
GCC Administrator [Mon, 12 Jul 2021 00:19:07 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 11 Jul 2021 00:19:06 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 10 Jul 2021 00:19:19 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 9 Jul 2021 00:18:47 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 8 Jul 2021 00:18:56 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 7 Jul 2021 00:19:38 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 6 Jul 2021 00:19:11 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 5 Jul 2021 00:18:50 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 4 Jul 2021 00:18:50 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 3 Jul 2021 00:19:01 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 2 Jul 2021 00:19:16 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 1 Jul 2021 00:19:05 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 30 Jun 2021 00:19:12 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 29 Jun 2021 00:19:00 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 28 Jun 2021 00:18:51 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 27 Jun 2021 00:18:45 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 26 Jun 2021 00:19:18 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 25 Jun 2021 00:19:24 +0000 (00:19 +0000)]
Daily bump.

3 years agoi386: Prevent unwanted combine from LZCNT to BSR [PR101175]
Uros Bizjak [Wed, 23 Jun 2021 10:50:53 +0000 (12:50 +0200)]
i386: Prevent unwanted combine from LZCNT to BSR [PR101175]

The current RTX pattern for BSR allows combine pass to convert LZCNT insn
to BSR. Note that the LZCNT has a defined behavior to return the operand
size when operand is zero, where BSR has not.

Add a BSR specific setting of zero-flag to RTX pattern of BSR insn
in order to avoid matching unwanted combinations.

2021-06-23  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
PR target/101175
* config/i386/i386.md (bsr_rex64): Add zero-flag setting RTX.
(bsr): Ditto.
(*bsrhi): Remove.
(clz<mode>2): Update RTX pattern for additions.

gcc/testsuite/

PR target/101175
* gcc.target/i386/pr101175.c: New test.

(cherry picked from commit 1e16f2b472c7d253d564556a048dc4ae16119c00)

3 years agoDaily bump.
GCC Administrator [Thu, 24 Jun 2021 00:19:06 +0000 (00:19 +0000)]
Daily bump.

3 years agoAdd mklog.py.
Martin Liska [Wed, 23 Jun 2021 08:12:20 +0000 (10:12 +0200)]
Add mklog.py.

contrib/ChangeLog:

* mklog.py: New file.
* test_mklog.py: New file.

3 years agocontrib: add git-commit-mklog wrapper
Martin Liska [Wed, 23 Jun 2021 07:48:15 +0000 (09:48 +0200)]
contrib: add git-commit-mklog wrapper

contrib/ChangeLog:

* git-commit-mklog.py: New file.

3 years agoDaily bump.
GCC Administrator [Wed, 23 Jun 2021 00:18:48 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 22 Jun 2021 00:18:56 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 21 Jun 2021 00:18:45 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 20 Jun 2021 00:18:54 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 19 Jun 2021 00:19:19 +0000 (00:19 +0000)]
Daily bump.

3 years agolibstdc++: Replace incorrect static assertion in std::reduce [PR95833]
Jonathan Wakely [Fri, 18 Jun 2021 13:46:58 +0000 (14:46 +0100)]
libstdc++: Replace incorrect static assertion in std::reduce [PR95833]

The standard does not require the iterator's value type to be
convertible to the result type, it only requires that the result of
dereferencing the iterator can be passed to the binary function.

libstdc++-v3/ChangeLog:

PR libstdc++/95833
* include/std/numeric (reduce(Iter, Iter, T, BinaryOp)): Replace
incorrect static_assert with ones matching the 'Mandates'
conditions in the standard.
* testsuite/26_numerics/reduce/95833.cc: New test.

(cherry picked from commit 0532452dcd17910dfd3d2b0df50dfe3ef1194bf7)

3 years agolibstdc++: Fix filesystem::path constraints for volatile [PR 100630]
Jonathan Wakely [Mon, 17 May 2021 10:54:06 +0000 (11:54 +0100)]
libstdc++: Fix filesystem::path constraints for volatile [PR 100630]

The constraint check for filesystem::path construction uses
decltype(__is_path_src(declval<Source>())) which mean it considers
conversion from an rvalue.  When Source is a volatile-qualified type
it cannot use is_path_src(const Unknown&) because a const lvalue
reference can only bind to a non-volatile rvalue.

Since the relevant path members all have a const Source& parameter,
the constraint should be defined in terms of declval<const Source&>(),
not declval<Source>(). This avoids the problem of volatile-qualified
rvalues, because we no longer use an rvalue at all.

libstdc++-v3/ChangeLog:

PR libstdc++/100630
* include/bits/fs_path.h (__is_constructible_from): Test
construction from a const lvalue, not an rvalue.
* include/experimental/bits/fs_path.h (__is_constructible_from):
Likewise.
* testsuite/27_io/filesystem/path/construct/100630.cc: New test.
* testsuite/experimental/filesystem/path/construct/100630.cc:
New test.

(cherry picked from commit 4cd69a5a0dd31bc6fdef1bbabc8d6d1416014ea1)

3 years agolibstdc++: Do not use deduced return type for std::visit [PR 100384]
Jonathan Wakely [Tue, 4 May 2021 11:16:46 +0000 (12:16 +0100)]
libstdc++: Do not use deduced return type for std::visit [PR 100384]

This avoids errors outside the immediate context when std::visit is an
overload candidate because of ADL, but not actually viable.

The solution is to give std::visit a non-deduced return type. New
helpers are introduced for that.

libstdc++-v3/ChangeLog:

PR libstdc++/100384
* include/std/variant (__get_t): New alias template yielding the
return type of std::get<N> on a variant.
(__visit_result_t): New alias template yielding the result of
std::visit.
(__do_visit): Use __get_t.
(visit): Use __visit_result_t for return type.
* testsuite/20_util/variant/100384.cc: New test.

(cherry picked from commit af5b2b911dd80ae9cc87404b7e7ab807cf6655d4)

3 years agolibstdc++: Reject std::make_shared<T[]> [PR 99006]
Jonathan Wakely [Thu, 22 Apr 2021 14:46:51 +0000 (15:46 +0100)]
libstdc++: Reject std::make_shared<T[]> [PR 99006]

Prior to C++20 it should be ill-formed to use std::make_shared with an
array type (and we don't support the C++20 feature to make it valid yet
anyway).

libstdc++-v3/ChangeLog:

PR libstdc++/99006
* include/bits/shared_ptr.h (allocate_shared): Assert that _Tp
is not an array type.
* include/bits/shared_ptr_base.h (__allocate_shared): Likewise.
* testsuite/20_util/shared_ptr/creation/99006.cc: New test.

(cherry picked from commit 55650236cd97d81f42f9fdb4f6bcb12babafe51f)

3 years agolibstdc++: Simplify constexpr checks in std::char_traits [PR 91488]
Jonathan Wakely [Thu, 17 Jun 2021 13:11:22 +0000 (14:11 +0100)]
libstdc++: Simplify constexpr checks in std::char_traits [PR 91488]

This removes the 'static' keyword from the helper functions added by
r8-1294 to detect whether the char_traits member functions can be
evaluated at compile time. This prevents the "inlining failed" error
reported in the PR.

The new testcase from the PR is added to the libitm testsuite, because
that's where we can be sure it's OK to use the -fgnu-tm option.

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

libstdc++-v3/ChangeLog:

* include/bits/char_traits.h (__constant_string_p)
(__constant_array_p): Give external linkage.

libitm/ChangeLog:

* testsuite/libitm.c++/libstdc++-pr91488.C: New test.

(cherry picked from commit b376b1ef38971b84975ad1540bf5d2ae0b924e76)

3 years agolibstdc++: Fix find_type helper to work consistently
Jonathan Wakely [Thu, 11 Mar 2021 16:48:32 +0000 (16:48 +0000)]
libstdc++: Fix find_type helper to work consistently

The find_type helper function sometimes results in "class X::name" and
lookup for that fails. For more details see "Problem 1" in
https://gcc.gnu.org/pipermail/libstdc++/2021-March/052132.html and the
example at https://sourceware.org/bugzilla/show_bug.cgi?id=27510#c2

This patch replaces typ.unqualified() with typ.tag, which is never
qualified, and will never include the 'class' or 'struct' keywords.
Using the .tag attribute should be safe here because we know we are
looking at a class type and we've already used strip_typedefs().

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py (find_type): Use tag attribute
instead of unqualified() method.

(cherry picked from commit 9dacc828bf8b087ddfaf797ed7238da45609082c)

3 years agoDaily bump.
GCC Administrator [Fri, 18 Jun 2021 00:19:49 +0000 (00:19 +0000)]
Daily bump.

3 years agoIBM Z: Fix vector intrinsics vec_double and vec_floate
Marius Hillenbrand [Wed, 16 Jun 2021 16:26:48 +0000 (18:26 +0200)]
IBM Z: Fix vector intrinsics vec_double and vec_floate

Fix the mapping of vec_double and vec_floate to builtins.

gcc/ChangeLog:

PR target/100871
* config/s390/vecintrin.h (vec_doublee): Fix to use
  __builtin_s390_vflls.
(vec_floate): Fix to use __builtin_s390_vflrd.

(cherry picked from commit a4fc63e0c3c6c7b895225c883137d152743be7fc)

3 years agoDaily bump.
GCC Administrator [Thu, 17 Jun 2021 00:19:38 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 16 Jun 2021 00:19:42 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 15 Jun 2021 00:19:07 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 14 Jun 2021 00:19:07 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 13 Jun 2021 00:19:03 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 12 Jun 2021 00:19:02 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Fri, 11 Jun 2021 09:12:21 +0000 (09:12 +0000)]
Daily bump.

3 years agod: Fix ICE in TypeInfoDeclaration, at dmd/declaration.c (PR100967)
Iain Buclaw [Thu, 10 Jun 2021 17:59:23 +0000 (19:59 +0200)]
d: Fix ICE in TypeInfoDeclaration, at dmd/declaration.c (PR100967)

Generate a stub TypeInfo class even if the root Object class is missing.
The front-end will take care of issuing an error and abort the
compilation when running semantic on constructed TypeInfo objects.

The errors issued by the code generation pass relating to missing or
disabled RTTI has been consolidated into a single function, so that a
meaningful error will be emitted before the front-end terminates.

gcc/d/ChangeLog:

PR d/100967
* d-frontend.cc (getTypeInfoType): Move TypeInfo checks to
check_typeinfo_type and call new function.
* d-tree.h (check_typeinfo_type): Declare.
* typeinfo.cc: Include dmd/scope.h.
(create_frontend_tinfo_types): Generate front-end types even if Object
is missing.
(build_typeinfo): Move TypeInfo checks to check_typeinfo_type and call
new function.
(check_typeinfo_type): New function.

gcc/testsuite/ChangeLog:

PR d/100967
* gdc.dg/pr100967.d: New test.

(cherry picked from commit 5ae4a73057dd26e7f09b5ba5190b84b1bbea4368)

3 years agoPR d/90651 (ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524)
Iain Buclaw [Thu, 10 Jun 2021 17:48:49 +0000 (19:48 +0200)]
PR d/90651 (ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524)

Fixes segmentation fault in FuncDeclaration::semantic3.

gcc/d/ChangeLog:

PR d/90651
* dmd/expressionsem.c (ExpressionSemanticVisitor::visit (TypeidExp)):
Error when TypeInfo doesn't exist.
* dmd/func.c (FuncDeclaration::semantic3): Likewise.
* dmd/mtype.c (TypeClass::dotExp): Likewise.
* typeinfo.cc (object_module): New variable.
(make_frontend_typeinfo): Update signature.  Set temporary on
generated TypeInfo classes.
(create_tinfo_types): Set object_module.  Move generation of front-end
typeinfo into ...
(create_frontend_tinfo_types): ... New function.
(layout_typeinfo): Call create_frontend_tinfo_types.
(layout_classinfo): Likewise.
(layout_cpp_typeinfo): Likewise.
(create_typeinfo): Likewise.

gcc/testsuite/ChangeLog:

PR d/90651
* gdc.test/fail_compilation/extra-files/minimal/object.d: New file.
* gdc.test/fail_compilation/fail19911a.d: New test.
* gdc.test/fail_compilation/fail19911b.d: New test.
* gdc.test/fail_compilation/fail19911c.d: New test.
* gdc.test/fail_compilation/fail19922.d: New test.
* gdc.test/fail_compilation/fail19923.d: New test.

(cherry picked from commit 88ad43b1f91f7cd2ba9c342c6c1a6da82e6088bf)

3 years agoDaily bump.
GCC Administrator [Thu, 10 Jun 2021 00:19:06 +0000 (00:19 +0000)]
Daily bump.

3 years agod: TypeInfo error when using slice copy on Structs (PR100964)
Iain Buclaw [Wed, 9 Jun 2021 17:39:28 +0000 (19:39 +0200)]
d: TypeInfo error when using slice copy on Structs (PR100964)

Known limitation: does not work for struct with postblit or dtor.

gcc/d/ChangeLog:

PR d/100964
* dmd/expression.c (Expression::checkPostblit): Don't generate
TypeInfo when RTTI is disabled.

gcc/testsuite/ChangeLog:

PR d/100964
* gdc.test/compilable/betterCarray.d: Add test cases.

(cherry picked from commit 10d4f283f4177d80cec3c9e8bf447a48cab5bb47)

3 years agod: Respect explicit align(N) type alignment (PR100935)
Iain Buclaw [Wed, 9 Jun 2021 17:37:22 +0000 (19:37 +0200)]
d: Respect explicit align(N) type alignment (PR100935)

It was previously the natural type alignment, defined as the maximum of
the field alignments for an aggregate.  Make sure an explicit align(N)
overrides it.

gcc/d/ChangeLog:

PR d/100935
* dmd/mtype.c (Type::getProperty): Prefer explicit alignment over
natural alignment for alignof property.

gcc/testsuite/ChangeLog:

PR d/100935
* gdc.test/compilable/aggr_alignment.d: Add test cases.

(cherry picked from commit 3ba036dd1a752d29764ad44adca6e68bec9599fe)

3 years agoDaily bump.
GCC Administrator [Wed, 9 Jun 2021 00:19:02 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 8 Jun 2021 00:19:16 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 7 Jun 2021 00:18:48 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 6 Jun 2021 00:18:59 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 5 Jun 2021 00:18:58 +0000 (00:18 +0000)]
Daily bump.

3 years agod: Fix ICE in gimplify_var_or_parm_decl, at gimplify.c:2755 (PR100882)
Iain Buclaw [Fri, 4 Jun 2021 17:38:26 +0000 (19:38 +0200)]
d: Fix ICE in gimplify_var_or_parm_decl, at gimplify.c:2755 (PR100882)

Constructor calls for temporaries were reusing the TARGET_EXPR_SLOT of a
TARGET_EXPR for an assignment, which later got passed to `build_assign',
which stripped away the outer TARGET_EXPR, leaving a reference to a lone
temporary with no declaration.

This stripping away of the TARGET_EXPR also discarded any cleanups that
may have been assigned to the expression as well.

So now the reuse of TARGET_EXPR_SLOT has been removed, and
`build_assign' now constructs assignments inside the TARGET_EXPR_INITIAL
slot.  This has also been extended to `return_expr', to deal with
possibility of a TARGET_EXPR being returned.

gcc/d/ChangeLog:

PR d/100882
* d-codegen.cc (build_assign): Construct initializations inside
TARGET_EXPR_INITIAL.
(compound_expr): Remove intermediate expressions that have no
side-effects.
(return_expr): Construct returns inside TARGET_EXPR_INITIAL.
* expr.cc (ExprVisitor::visit (CallExp *)): Remove useless assignment
to TARGET_EXPR_SLOT.

gcc/testsuite/ChangeLog:

PR d/100882
* gdc.dg/pr100882a.d: New test.
* gdc.dg/pr100882b.d: New test.
* gdc.dg/pr100882c.d: New test.
* gdc.dg/pr100882d.d: New test.

(cherry picked from commit e8761d4c21b5f4cc1c5612be9bf952a07c8a2238)

3 years agoFortran - ICE in inline_matmul_assign
Harald Anlauf [Fri, 4 Jun 2021 17:23:48 +0000 (19:23 +0200)]
Fortran - ICE in inline_matmul_assign

Restrict inlining of matmul to those cases where assignment to the
result array does not need special treatment.

gcc/fortran/ChangeLog:

PR fortran/99839
* frontend-passes.c (inline_matmul_assign): Do not inline matmul
if the assignment to the resulting array if it is not of canonical
type (real/integer/complex/logical).

gcc/testsuite/ChangeLog:

PR fortran/99839
* gfortran.dg/inline_matmul_25.f90: New test.

(cherry picked from commit bee8619ad0ac3bd27b7c8dc5819b83a5e8e147a0)

3 years agoDaily bump.
GCC Administrator [Fri, 4 Jun 2021 00:19:01 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 3 Jun 2021 00:18:53 +0000 (00:18 +0000)]
Daily bump.

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

3 years agoBump BASE-VER to 9.4.1
Richard Biener [Tue, 1 Jun 2021 08:21:40 +0000 (10:21 +0200)]
Bump BASE-VER to 9.4.1

This bumps BASE-VER to 9.4.1.

2021-06-01  Richard Biener  <rguenther@suse.de>

* BASE-VER: Set to 9.4.1.

3 years agoUpdate ChangeLog and version files for release releases/gcc-9.4.0
Richard Biener [Tue, 1 Jun 2021 07:53:23 +0000 (07:53 +0000)]
Update ChangeLog and version files for release

3 years agoDaily bump.
GCC Administrator [Tue, 1 Jun 2021 00:19:13 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Mon, 31 May 2021 00:19:02 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sun, 30 May 2021 00:18:56 +0000 (00:18 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Sat, 29 May 2021 00:18:59 +0000 (00:18 +0000)]
Daily bump.

3 years agoc++: 'this' adjustment for devirtualized call
Jason Merrill [Fri, 28 May 2021 03:54:52 +0000 (23:54 -0400)]
c++: 'this' adjustment for devirtualized call

My patch for 95719 made us do a better job of finding the actual virtual
function we want to call, but didn't update the 'this' pointer adjustment to
match.

This backport also incorporates a bit of the r11-1638 reorganization.

PR c++/100797
PR c++/95719

gcc/cp/ChangeLog:

* call.c (build_over_call): Adjust base_binfo in
resolves_to_fixed_type_p case.

gcc/testsuite/ChangeLog:

* g++.dg/inherit/virtual15.C: New test.
* g++.dg/inherit/virtual15a.C: New test.

3 years agoDaily bump.
GCC Administrator [Fri, 28 May 2021 00:19:22 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Thu, 27 May 2021 00:19:21 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Wed, 26 May 2021 00:19:10 +0000 (00:19 +0000)]
Daily bump.

3 years agoDaily bump.
GCC Administrator [Tue, 25 May 2021 00:19:29 +0000 (00:19 +0000)]
Daily bump.

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