> https://gcc.gnu.org/pipermail/gccadmin/2020q4/017037.html
>
> OSError: [Errno 28] No space left on device:
> '/tmp/tmp.Zq3p6D4MxS/gcc/.git/objects/objn31xpefh' ->
> '/tmp/tmp.Zq3p6D4MxS/gcc/.git/objects/db/ffb02a4bcdd4ec04af3db75d86b8cc2e52bdff'
>
> Maybe change the script to use /sourceware/snapshot-tmp/gcc (which has
> rather more space) instead of /tmp?
This patch implements that.
2020-12-17 Jakub Jelinek <jakub@redhat.com>
* update_version_git: Put BASEDIR into /sourceware/snapshot-tmp/gcc
if it exist.
This implements support for powerpc64le architecture on FreeBSD. Since
we don't have powerpcle (32-bit), I did not add support for powerpcle
here. This remains to be changed if there is powerpcle support in the
future.
2020-12-15 Piotr Kubaj <pkubaj@FreeBSD.org>
gcc/
* config.gcc (powerpc*le-*-freebsd*): Add.
* configure.ac (powerpc*le-*-freebsd*): Ditto.
* configure: Regenerate.
* config/rs6000/freebsd64.h (ASM_SPEC_COMMON): Use ENDIAN_SELECT.
(DEFAULT_ASM_ENDIAN): Add little endian support.
(LINK_OS_FREEBSD_SPEC64): Ditto.
ISO C17 6.5.15.1 specifies that the result is the
type the LHS would have after lvalue conversion.
2020-12-16 Martin Uecker <muecker@gwdg.de>
gcc/c/
PR c/98047
* c-typeck.c (build_modify_expr): Drop qualifiers.
gcc/testsuite/
PR c/98047
* gcc.dg/qual-assign-7.c: New test.
2020-12-16 Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
gcc/
* config/xtensa/xtensa.c (xtensa_emit_move_sequence): Try to
replace 'l32r' with 'movi' + 'slli' when optimizing for size.
* config/xtensa/xtensa.md (movdi): Split loading DI mode constant
into register pair into two loads of SI mode constants.
Rather than early-include sys/socket.h, let's allow the includer to
tell cody no networking.
libcody/
* cody.hh: Allow user to set CODY_NETWORKING.
gcc/cp/
* mapper-resolver.cc: Remove early include of
sys/socket.h. Specify no CODY_NETWORKING instead.
* module.cc: Specify no CODY_NETWORKING.
I think this is nonsense code, we seem to be naming an instantiation
of a template template parm. But this fixes the ICE. Perhaps we
should diagnose the issue earlier?
gcc/cp/
* parser.c (cp_parser_elaborated_type_specifier): Test
BOUND_TEMPLATE_TEMPLATE_PARM before checking for instantiation.
gcc/testsuite/
* g++.dg/template/pr98297.C: New.
I'd missed an install-strip rule in c++tools. Here it is, cribbed
from gcc/ subdir.
c++tools/
* Makefile.in (INSTALL): Replace with ...
(INSTALL_PROGRAM): ... this.
(INSTALL_STRIP_PROGRAM): New.
(install-strip): New target.
(install): Use INSTALL_PROGRAM.
* configure.ac: Add INSTALL_PROGRAM.
* configure: Regenerated.
Now that GCC supports __has_builtin there is no need to test whether
it's defined, we can just use it unconditionally.
libstdc++-v3/ChangeLog:
* include/std/utility: Use __has_builtin without checking if
it's defined.
Recent changes to use __int128 as an integer-like type in <ranges> and
to optimize std::uniform_int_distribution mean that the library relies
on __int128 more heavily than in the past.
The library expects that if __int128 is supported then either
__GLIBCXX_TYPE_INT_N_0 is defined (and we treat is like the standard
integer types), or __STRICT_ANSI__ is defined (and we need to add
special handling for __int128 as a non-standard integer type).
If users compile with -std=c++NN -U__STRICT_ANSI__ then it puts the
library into a broken and inconsistent state, where the compiler doesn't
define the __GLIBCXX_TYPE_INT_N_0 macro, but the library thinks it
doesn't need special handling for __int128. What the user should do is
compile with -std=gnu++NN instead.
This adds a warning if it appears that __int128 is supported but neither
__GLIBCXX_TYPE_INT_N_0 nor __STRICT_ANSI__ is defined.
libstdc++-v3/ChangeLog:
* include/bits/c++config: Warn if __STRICT_ANSI__ state is
inconsistent with __GLIBCXX_TYPE_INT_N_0.
Prefixed instructions should not have their length explicitly set to '8'. The function get_attr_length() will adjust the length appropriately based on the value of the "prefixed" attribute.
2020-12-16 Pat Haugen <pthaugen@linux.ibm.com>
gcc/
* config/rs6000/mma.md (*movxo, mma_<vvi4i4i8>, mma_<avvi4i4i8>,
mma_<vvi4i4i2>, mma_<avvi4i4i2>, mma_<vvi4i4>, mma_<avvi4i4>,
mma_<pvi4i2>, mma_<apvi4i2>, mma_<vvi4i4i4>, mma_<avvi4i4i4>):
Remove explicit setting of length attribute.
There is another path to get to a poisoned bcopy. Fixed thusly.
gcc/cp/
* mapper-resolver.cc: #include sys/socket before system.h
due to poisoned bcopy use.
> The -enable-checking configure code in libcody didn't play well with
> us. This just uses libcpp's configurey for that piece.
This doesn't set is_release anywhere, which means when --enable-checking*
or --disable-checking isn't specified, it always treats it as
--enable-checking=yes, while the normal gcc behavior is treat only trunk
as --enable-checking=yes and treat release branches as
--enable-checking=release by default.
On the other side, nothing uses those ac_assert_checking and
ac_valgrind_checking variables, so it is a waste to compute those.
2020-12-16 Jakub Jelinek <jakub@redhat.com>
* configure.ac: Compute is_release.
(NMS_ENABLE_CHECKING): Simplify but not computing ac_assert_checking
and ac_valgrind_checking the code doesn't use.
* configure: Regenerated.
Reject DATA elements with the ALLOCATABLE attribute also when they are
components of a derived type.
gcc/fortran/ChangeLog:
PR fortran/98284
* resolve.c (check_data_variable): Reject DATA elements with the
ALLOCATABLE attribute.
gcc/testsuite/ChangeLog:
PR fortran/98284
* gfortran.dg/pr98284.f90: New test.
The SECTION_LINK_ORDER changes don't seem to work properly.
If I compile:
static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((patchable_function_entry(0, 0))) int foo (int x)
{
return x + 1;
}
static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((patchable_function_entry(0, 0))) int bar (int x)
{
return x + 2;
}
int
baz (int x)
{
return foo (x) + 1;
}
int
qux (int x)
{
return bar (x) + 2;
}
(distilled from aarch64 Linux kernel) with
-O2 -fpatchable-function-entry=2 on aarch64 compiler configured against
latest binutils, I get:
...
.section __patchable_function_entries,"awo",@progbits,baz
...
.section __patchable_function_entries
...
in the assembly, but when it is assembled, one gets:
[ 4] __patchable_function_entries PROGBITS 0000000000000000 000060 000008 00 WAL 1 0 8
[ 5] .rela__patchable_function_entries RELA 0000000000000000 000280 000018 18 I 12 4 8
[ 6] __patchable_function_entries PROGBITS 0000000000000000 000068 000008 00 0 0 8
[ 7] .rela__patchable_function_entries RELA 0000000000000000 000298 000018 18 I 12 6 8
i.e. one writable allocated section with SHF_LINK_ORDER and another
non-allocated non-writable without link order. In the kernel case there is
always one entry in the WAL section and then dozens or more in the
non-allocated one.
The kernel then fails to link:
WARNING: modpost: vmlinux.o (__patchable_function_entries): unexpected non-allocatable section.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.
ld: .init.data has both ordered [`__patchable_function_entries' in init/main.o] and unordered [`.init.data' in
+./drivers/firmware/efi/libstub/vsprintf.stub.o] sections
ld: final link failed: bad value
make: *** [Makefile:1175: vmlinux] Error 1
The following patch fixes it by always forcing full section flags for
SECTION_LINK_ORDER sections.
2020-12-16 Jakub Jelinek <jakub@redhat.com>
* varasm.c (default_elf_asm_named_section): Always force
section flags even for sections with SECTION_LINK_ORDER flag.
Before CWG DR 1955 the controlling expression for an #elif must be
syntactically correct, meaning this won't compile with C++11 compilers
such as gcc 4.8:
The solution is to define __has_include(X) as 0 for compilers that don't
support it.
The second problem is that when <source_location> is found, it is used
without the std:: qualification.
libcody/ChangeLog:
* internal.hh: Define fallback macros for __has_builtin and
__has_include. Use __has_builtin for __builtin_FILE and
__builtin_LINE. Define alias for std::source_location.
Clang doesn't support __builtin_sprintf, so use std::sprintf instead.
libstdc++-v3/ChangeLog:
PR libstdc++/96083
* include/ext/throw_allocator.h: Use __has_builtin to check for
__builtin_sprintf support, and use std::sprtinf if necessary.
The -enable-checking configure code in libcody didn't play well with
us. This just uses libcpp's configurey for that piece.
libcody/
* configure.ac: Use libcpp's enable-checking code.
* configure: Rebuilt.
module.cc has a static initializer that ends up in a circular
dependency when detailed mem stats are enabled. This removes the need
for that initializer to be dynamic, and we punt to the lazy
initializing we already had inside the object in question anyway. At
the cost of an additional indirection.
gcc/cp/
* module.cc (loc_spans): Make spans a pointer, not inline.
Adjust all accesses.
When SECTION_RETAIN is used, issue a warning when a symbol without used
attribute and a symbol with used attribute are placed in the section with
the same name, like
int __attribute__((used,section(".data.foo"))) foo2 = 2;
int __attribute__((section(".data.foo"))) foo1 = 1;
since assembler will put them in different sections with the same section
name.
gcc/
PR target/98146
* varasm.c (switch_to_section): Warn when a symbol without used
attribute and a symbol with used attribute are placed in the
section with the same name.
gcc/testsuite/
PR target/98146
* c-c++-common/attr-used-5.c: Updated.
* c-c++-common/attr-used-6.c: Likewise.
* c-c++-common/attr-used-7.c: Likewise.
* c-c++-common/attr-used-8.c: Likewise.
When definitions marked with used attribute and unmarked definitions are
placed in the section with the same name, switch to a new section if the
SECTION_RETAIN bit doesn't match.
gcc/
PR target/98146
* output.h (switch_to_section): Add a tree argument, default to
nullptr.
* varasm.c (get_section): If the SECTION_RETAIN bit doesn't match,
return and switch to a new section later.
(assemble_start_function): Pass decl to switch_to_section.
(assemble_variable): Likewise.
(switch_to_section): If the SECTION_RETAIN bit doesn't match,
switch to a new section.
gcc/testsuite/
PR target/98146
* c-c++-common/attr-used-5.c: New test.
* c-c++-common/attr-used-6.c: Likewise.
* c-c++-common/attr-used-7.c: Likewise.
* c-c++-common/attr-used-8.c: Likewise.
* c-c++-common/attr-used-9.c: Likewise.
Currently the <experimental/random>, <experimental/source_location> and
<experimental/utility> headers can be included in C++98 and C++11 modes,
but gives errors. With this change they can be included, but define
nothing.
libstdc++-v3/ChangeLog:
PR libstdc++/98319
* include/experimental/random: Only define contents for C++14
and later.
* include/experimental/source_location: Likewise.
* include/experimental/utility: Likewise.
* testsuite/experimental/feat-lib-fund.cc: Include all LFTS
headers that are present. Allow test to run for all modes.
This adds a test to compare the performance of std::atomic_flag with
similar operations on std::atomic_uchar and std::atomic_int.
libstdc++-v3/ChangeLog:
PR libstdc++/46447
* testsuite/performance/29_atomics/atomic_flag.cc: New test.
This fixes a bug caused by a mismatch between the macros defined by
<errno.h> when GCC is built and the macros defined by <errno.h> when
users include <system_error>. If the user code is compiled with
_XOPEN_SOURCE defined to 500 or 600, Darwin suppresses the
ENOTRECOVERABLE and EOWNERDEAD macros, which are not defined by SUSv3
(aka POSIX.1-2001).
Since POSIX requires the errno macros to be macros (and not variables or
enumerators) we can just test for them directly using the preprocessor.
That means that <system_error> will match what is actuallydefined when
it's included, not what was defined when GCC was built. With that change
there is no need for the GLIBCXX_CHECK_SYSTEM_ERROR configure checks and
they can be removed.
libstdc++-v3/ChangeLog:
PR libstdc++/93151
* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Remove.
* configure.ac: Regenerate.
* config/os/generic/error_constants.h: Test POSIX errno macros
directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
* testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
Likewise.
* testsuite/19_diagnostics/headers/system_error/93151.cc: New
test.
Solaris' sys/socket uses the poisoned bcopy identifier, so we must
preemptively copy a bit of cody's inclusion logic to get it earlier.
gcc/cp/
* mapper-client.cc: Include sys/socket.h before system.h.
gcc/ada/
* sem_ch5.adb (Analyze_Iterator_Specification): If iterator
filter is present, preanalyze filter without expansion.
(Analyze_Loop_Parameter_Specification): When
loop_Parameter_Specification is rewritten as
Iterator_Specification, transfer Iterator_Filter if present.
gcc/ada/
* libgnat/s-objrea.ads (Object_Arch): Add ARM enum
* libgnat/s-objrea.adb (Initialize): Add EM_ARM case.
(Read_Address): Add ARM case to 32bit read.
* Makefile.rtl: Add trasym units to the runtime for armhf-linux.
gcc/ada/
* libgnat/s-valrea.adb (Maxexp32): New constant array.
(Maxexp64): Likewise.
(Maxexp80): Likewise.
(Integer_to_Real): New local constants Maxexp and B.
When the exponent is too negative, do the divison in two steps.
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Specifications): Add a codefix
for extra parentheses around aspect Annotate expression; reject
"(null record)" aggregate and extra parentheses around aspect
Test_Case expression.
* sem_prag.adb (Analyze_Pragma): Reject "null", "(null record)"
and extra parentheses around pragma Contract_Cases; likewise for
pragma Subprogram_Variant.
gcc/ada/
* adaint.h (__gnat_in_child_after_fork): New flag to express
child process side after fork call.
* adaint.c (__gnat_portable_spawn): Set flag
__gnat_in_child_after_fork.
* expect.c (__gnat_expect_fork): Set __gnat_in_child_after_fork
to one on child side.
* libgnat/memtrack.adb
(In_Child_After_Fork): Flag to disable memory tracking.
(Allow_Trace): New routine defining if memory should be tracked.
(Alloc, Realloc, Free): Use Allow_Trace in "if" condition
instead of First_Call.