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.
gcc/ada/
* libgnat/a-tifiio.adb: Mark body not in SPARK.
* libgnat/a-tifiio.ads: Mark spec in SPARK.
* libgnat/a-tifiio__128.adb: Mark body not in SPARK.
The following patch teaches the bswap pass to handle for small (2/4/8 byte
long) vectors a CONSTRUCTOR by determining if the bytes of the constructor
come from non-vector sources and are either nop or bswap and changing the
CONSTRUCTOR in that case to VIEW_CONVERT_EXPR from scalar integer to
the vector type.
Unfortunately, as I found after the patch was written, due to pass ordering
this doesn't really fix the original testcase, just the one I wrote,
because both loop and slp vectorization is done only after the bswap pass.
A possible way out of that would be to perform just this particular bswap
optimization (i.e. for CONSTRUCTOR assignments with integral vector types
call find_bswap_or_nop and bswap_replace if successful) also during the
store merging pass, it isn't really a store, but the store merging pass
already performs bswapping when handling store, so it wouldn't be that big
hack. What do you think?
2020-12-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/96239
* gimple-ssa-store-merging.c (find_bswap_or_nop): Handle a vector
CONSTRUCTOR.
(bswap_replace): Likewise.
* gcc.dg/pr96239.c: New test.
Since g:7caa49706316e650fb67719e1a1bf3a35054b685 the option is ignored
as we print used command line for -fverbose-asm output.
gcc/ChangeLog:
* doc/options.texi: Remove Report keyword.
* opt-functions.awk: Print error when Report keyword
is used.
* optc-gen.awk: Do not handle Report keyword.
* opts.h (struct cl_option): Remove cl_report bitfield flag.
This fixes the precision mismatch introduced by the previous change.
gcc/ChangeLog:
PR tree-optimization/98272
* tree-switch-conversion.c (bit_test_cluster::emit): When finding
out whether the entry test can be merged in the bit test, do the
computation using the type of the index expression.
gcc/testsuite/ChangeLog:
* gcc.dg/pr98272.c: New test.
This patch is to use paradoxical subreg instead of
zero_extend for promoting QI/HI to SI/DI when we
want to construct one vector with these modes.
Since we do the gpr->vsx movement and vector merge
or pack later, the high part is useless and safe to
use paradoxical subreg. It can avoid useless rlwinms
generated for signed cases.
Bootstrapped/regtested on powerpc64le-linux-gnu P9.
gcc/ChangeLog:
* config/rs6000/rs6000.c (rs6000_expand_vector_init): Use
paradoxical subreg instead of zero_extend for QI/HI promotion.
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr96933-1.c: Adjusted to check no rlwinm.
* gcc.target/powerpc/pr96933-2.c: Likewise.
It turned out that r11-5942 fixed this old PR, and it was detected
by one of the few dg-ice tests -- exactly the point of them! Now
the PR won't be opened until someone notices that it'd been fixed.
The patch failed to remove the dg-ice though, so now it XPASSes. Fixing
this now.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/constexpr-52830.C: Remove dg-ice.
When the divisor is bool or has [0, 1] range, as division by
0 is UB, the only remaining option in valid programs is division by 1,
so we can optimize X / bool_range_Y into X.
2020-12-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/96094
* match.pd (X / bool_range_Y -> X): New simplification.
* gcc.dg/tree-ssa/pr96094.c: New test.
The DMD front-end shouldn't, but can sometimes leak manifest constants
in the AST passed to the code generator. To prevent this being an
issue, the setting of DECL_INITIAL has been moved to the point where the
CONST_DECL is used, rather than in the declaration handler.
gcc/d/ChangeLog:
PR d/98277
* decl.cc (DeclVisitor::visit (VarDeclaration *)): Move setting of
DECL_INITIAL for manifest constants to ...
(get_symbol_decl): ... here.
gcc/testsuite/ChangeLog:
PR d/98277
* gdc.dg/pr98277.d: New test.
This is specifically for the test fixedbugs/issue23781.go, which
builds a large static array. The code does compile and work without
this change, but it takes a long time and generates a large object
file. Discarding the unnecessary static initializer makes this test
much faster.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278172
A digit character is not invalid in general, but it's not permitted
at the start of an identifier. Report a better error message.
The test case is issue11359.go in the source repo.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278174
The current libstdc++ basic_file_stdio.cc code assumes a POSIX API
underneath the stdio implementation provided by the host libc. This
means that the host must provide a fairly broad POSIX file API,
including read, write, open, close, lseek and ioctl.
This patch changes basic_file_stdio.cc to only use basic ANSI-C stdio
functions, allowing it to be used with libc implementations like
picolibc which may not have a POSIX operating system underneath.
This is enabled by a new --enable-cstdio=stdio_pure configure option.
Aided-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
libstdc++-v3/ChangeLog:
* acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Allow "stdio_pure"
option and define _GLIBCXX_USE_PURE_STDIO when it is used. Also
add "stdio_posix" option as an alias for "stdio".
* config/io/basic_file_stdio.cc [_GLIBCXX_USE_PURE_STDIO]: Only
use defined stdio entry points for all I/O operations, without
direct calls to underlying POSIX functions.
* config.h.in: Regenerate.
* configure: Regenerate.
During satisfaction that's entered through the three-parameter version
of satisfy_declaration_constraints, current_function_decl gets set to
the dependent DECL_TEMPLATE_RESULT for sake of access checking. This
makes the predicate in_template_function return true during satisfaction
from this entrypoint, which in turn makes calls to mark_used exit early
before it does its full processing. This leads to us accepting the
invalid testcase below due to mark_used never attempting to deduce the
return type of A::foo() and detecting failure thereof.
It seems wrong for in_template_function to be true during instantiation
or during satisfaction, so this patch makes in_template_function inspect
the less volatile cfun->decl instead of current_function_decl.
gcc/cp/ChangeLog:
* pt.c (in_template_function): Inspect cfun->decl instead of
current_function_decl.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/concepts-requires23.C: New test.
This is the C++ modules implementation. Dropping in the real
module.cc file into the module-shaped hole I carved out. I include
some sanity tests for now. I'll commit the remaining tests when the
initial round of failures seems abated.
gcc/cp/
* module.cc: Replace stubs with implementation.
gcc/testsuite/
* g++.dg/modules/mod-decl-0-2a.C: New.
* g++.dg/modules/mod-decl-0.C: New.
* g++.dg/modules/mod-decl-1.C: New.
* g++.dg/modules/mod-decl-2_a.C: New.
* g++.dg/modules/mod-decl-2_b.C: New.
* g++.dg/modules/mod-decl-2_c.C: New.
* g++.dg/modules/mod-decl-3.C: New.
* g++.dg/modules/mod-decl-5_a.C: New.
* g++.dg/modules/mod-decl-5_b.C: New.
To avoid always requiring an active mapper to connect to, we provide a
default in-process mapper with similar functionality to the sample
server. This is that code. Also included is the client-side
connection mechanism, which determines what server to use and how to
connect to it.
gcc/cp/
* Make-lang.in (CXX_AND_OBJCXX_OBJS): Add mapper-client &
mapper-resolver.
* mapper-client.h: New.
* mapper-client.cc: New.
* mapper-resolver.cc: New.