[Bug c/90296] New: C11 anonymous struct not liked

2019-04-30 Thread tydeman at tybor dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90296

Bug ID: 90296
   Summary: C11 anonymous struct not liked
   Product: gcc
   Version: 8.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tydeman at tybor dot com
  Target Milestone: ---

This code, which I believe is valid C11 code, will not compile.

struct a {
  int y;
};  /* anonymous */

struct b {
  int x;
  struct a;
  int z;
};

static struct b c = { 20, 30, 50 };
static struct b d = { .z=5, .x=2, .y=3 };

[Bug libstdc++/61761] [C++11] std::proj returns incorrect values

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61761

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jonathan Wakely  ---
I fixed it differently in the end, but using the same logic. Thanks again.

[Bug libstdc++/61761] [C++11] std::proj returns incorrect values

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61761

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Wed May  1 00:08:36 2019
New Revision: 270759

URL: https://gcc.gnu.org/viewcvs?rev=270759=gcc=rev
Log:
PR libstdc++/61761 fix std::proj for targets without C99 cproj

The current generic implementation of __complex_proj used when cproj is
not available calculates the wrong projection, giving a different result
than given by C99's cproj.

When C99 cproj is not available but isinf and copysign are, use those to
give correct results for float, double and long double. Otherwise, and
for other specializations of std::complex, just use a generic version
that returns its argument, and so doesn't support infinities.

We might want to consider adding additional overloads of __complex_proj
to support extended types such as _Float64x, _Float128 etc.

PR libstdc++/61761
* include/std/complex (__complex_proj): Return parameter unchanged.
[_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
floating-point types to take std::complex arguments.
[_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
floating-point types.
* testsuite/26_numerics/complex/proj.cc: New test.

Added:
trunk/libstdc++-v3/testsuite/26_numerics/complex/proj.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/complex

[Bug target/71390] PowerPC GCC should warn if use does -mcpu=, and an old assembler was used

2019-04-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71390

Segher Boessenkool  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Segher Boessenkool  ---
Most HAVE_AS_* were deleted (in r264675).  [ Only HAVE_AS_MFCRF is left, and
we should get rid of that as well...  We shouldn't use the two-argument mfcr
at all, this is mfocrf in modern lingo. ]

Problems like PR70957 can now not happen at all.  Instead, when the compiler
generates code the assembler does not like, the user gets an error.  So just
don't use too old assemblers!

Closing this PR as WONTFIX.

[Bug libstdc++/90281] utf-8 encoded std::filesystem::path can not be converted to utf-16.

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90281

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||patch

--- Comment #2 from Jonathan Wakely  ---
Patch posted: https://gcc.gnu.org/ml/gcc-patches/2019-04/msg01242.html

[Bug libstdc++/90295] Please define ~exception_ptr inline

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90295

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |10.0

--- Comment #1 from Jonathan Wakely  ---
This requires exporting the _M_release() symbol:


diff --git a/libstdc++-v3/config/abi/pre/gnu.ver
b/libstdc++-v3/config/abi/pre/gnu.ver
index 58d3e900bbf..65ca21524db 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -2564,6 +2564,13 @@ CXXABI_1.3.12 {

 } CXXABI_1.3.11;

+CXXABI_1.3.13 {
+
+# std::exception_ptr::_M_release()
+_ZNSt15__exception_ptr13exception_ptr10_M_releaseEv;
+
+} CXXABI_1.3.12;
+
 # Symbols in the support library (libsupc++) supporting transactional memory.
 CXXABI_TM_1 {

diff --git a/libstdc++-v3/libsupc++/exception_ptr.h
b/libstdc++-v3/libsupc++/exception_ptr.h
index 3f21a70e54c..b8dbd7f5324 100644
--- a/libstdc++-v3/libsupc++/exception_ptr.h
+++ b/libstdc++-v3/libsupc++/exception_ptr.h
@@ -171,6 +171,14 @@ namespace std
   __dest_thunk(void* __x)
   { static_cast<_Ex*>(__x)->~_Ex(); }

+#ifndef _GLIBCXX_EH_PTR_COMPAT
+inline exception_ptr::~exception_ptr() noexcept
+{
+  if (_M_exception_object)
+   _M_release();
+}
+#endif
+
   } // namespace __exception_ptr

   /// Obtain an exception_ptr pointing to a copy of the supplied object.

[Bug libstdc++/90295] Please define ~exception_ptr inline

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90295

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-04-30
 Ever confirmed|0   |1
   Severity|normal  |enhancement

[Bug gcov-profile/47618] Collecting multiple profiles and using all for PGO

2019-04-30 Thread qinzhao at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47618

--- Comment #25 from qinzhao at gcc dot gnu.org ---
(In reply to Martin Liška from comment #24)
> 
> > How about the patch for the above 2? has it been committed?
> 
> It has been there for a while, please take a look at:
> 
> $ gcov-tool merge --help
> merge: unrecognized option '--help'
> Merge subcomand usage:  merge [options]   Merge coverage
> file contents
> -o, --output   Output directory
> -v, --verbose   Verbose mode
> -w, --weight Set weights (float point values)

two more questions on this merge tool:
1. it can only merge two directories at one time. So, for multiple directories,
for example "n", we have to invoke gcov-tool merge n-1 times in order to merge
all of them?
2. Intel compiler (icc)'s profmerge is able to merge all the .dyn files under
one directory, does gcc have such functionality currently?

[Bug target/90193] [8 Regression] asm goto with TLS "m" input operand generates incorrect assembler in O1 and O2

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90193

--- Comment #14 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:11:06 2019
New Revision: 270757

URL: https://gcc.gnu.org/viewcvs?rev=270757=gcc=rev
Log:
Backported from mainline
2019-04-24  Jakub Jelinek  

PR target/90193
* rtl.c (classify_insn): Return JUMP_INSN for asm goto.
* emit-rtl.c (try_split): Copy over REG_LABEL_TARGET.

* gcc.target/i386/pr90193.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/pr90193.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/emit-rtl.c
branches/gcc-8-branch/gcc/rtl.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug target/90187] [8 Regression] ICE in extract_insn, at recog.c:2304 x86_64

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90187

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:09:20 2019
New Revision: 270756

URL: https://gcc.gnu.org/viewcvs?rev=270756=gcc=rev
Log:
Backported from mainline
2019-04-24  Jakub Jelinek  

PR target/90187
* config/i386/i386.c (ix86_expand_sse_fp_minmax): Force if_true into
a register if both if_true and if_false are MEMs.

* g++.dg/opt/pr90187.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/opt/pr90187.C
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/i386/i386.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/90208] [7/8 Regression] error: EH landing pad label

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90208

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:08:27 2019
New Revision: 270755

URL: https://gcc.gnu.org/viewcvs?rev=270755=gcc=rev
Log:
Backported from mainline
2019-04-24  Jakub Jelinek  

PR tree-optimization/90208
* tree-cfg.c (remove_bb): Move forced labels from removed bbs
after labels of new_bb, not before them.

* gcc.dg/tsan/pr90208-2.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/tsan/pr90208-2.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-cfg.c

[Bug c++/90108] ICE: Segmentation fault (in c_tree_chain_next)

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90108

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:07:37 2019
New Revision: 270754

URL: https://gcc.gnu.org/viewcvs?rev=270754=gcc=rev
Log:
Backported from mainline
2019-04-19  Jakub Jelinek  

PR c++/90108
* c-decl.c (merge_decls): If remove is main variant and
DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
variant that has newdecl as TYPE_NAME if any.

* decl.c (duplicate_decls): If remove is main variant and
DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
variant that has newdecl as TYPE_NAME if any.

* c-c++-common/pr90108.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/c-c++-common/pr90108.c
Modified:
branches/gcc-8-branch/gcc/c/ChangeLog
branches/gcc-8-branch/gcc/c/c-decl.c
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/decl.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/90082] [9 Regression] ICE in delete_unmarked_insns, at dce.c:653

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90082

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:06:33 2019
New Revision: 270753

URL: https://gcc.gnu.org/viewcvs?rev=270753=gcc=rev
Log:
Backported from mainline
2019-04-16  Jakub Jelinek  

PR rtl-optimization/90082
* dce.c (can_delete_call): New function.
(deletable_insn_p, mark_insn): Use it.

* gcc.dg/pr90082.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr90082.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dce.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/90090] [7/8 Regression] ICE in mark_reachable_handlers, at tree-eh.c:3938 since r219202

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90090

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:05:39 2019
New Revision: 270752

URL: https://gcc.gnu.org/viewcvs?rev=270752=gcc=rev
Log:
Backported from mainline
2019-04-16  Jakub Jelinek  

PR tree-optimization/90090
* tree-ssa-math-opts.c (is_division_by): Ignore divisions that can
throw internally.
(is_division_by_square): Likewise.  Formatting fix.

* g++.dg/opt/pr90090.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/opt/pr90090.C
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-ssa-math-opts.c

[Bug c/89933] [7/8 Regression] ICE in merge_decls, at c/c-decl.c:2517

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89933

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:05:00 2019
New Revision: 270751

URL: https://gcc.gnu.org/viewcvs?rev=270751=gcc=rev
Log:
Backported from mainline
2019-04-12  Jakub Jelinek  

PR c/89933
* c-decl.c (merge_decls): When newdecl's type is its main variant,
don't try to remove it from the variant list, but instead assert
it has no variants.

* decl.c (duplicate_decls): When newdecl's type is its main variant,
don't try to remove it from the variant list, but instead assert
it has no variants.

* c-c++-common/pr89933.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/c-c++-common/pr89933.c
Modified:
branches/gcc-8-branch/gcc/c/ChangeLog
branches/gcc-8-branch/gcc/c/c-decl.c
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/decl.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/89965] [8 Regression] wrong code with -O -mtune=nano-x2 -fcaller-saves -fexpensive-optimizations -fno-tree-dce -fno-tree-ter

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89965

--- Comment #15 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:03:56 2019
New Revision: 270750

URL: https://gcc.gnu.org/viewcvs?rev=270750=gcc=rev
Log:
Backported from mainline
2019-04-12  Jakub Jelinek  

PR rtl-optimization/89965
* dce.c: Include rtl-iter.h.
(struct check_argument_load_data): New type.
(check_argument_load): New function.
(find_call_stack_args): Check for loads from stack slots still tracked
in sp_bytes and punt if any is found.

* gcc.target/i386/pr89965.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/pr89965.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dce.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c/89946] [8 Regression] ICE in assemble_start_function, at varasm.c:1871

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89946

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:03:11 2019
New Revision: 270749

URL: https://gcc.gnu.org/viewcvs?rev=270749=gcc=rev
Log:
Backported from mainline
2019-04-12  Jakub Jelinek  

PR c/89946
* varasm.c (assemble_start_function): Don't use tree_fits_uhwi_p
and gcc_unreachable if it fails, just call tree_to_uhwi which
verifies that too.  Test TREE_CHAIN instead of list_length > 1.
Start warning message with a lower-case letter.  Formatting fixes.

* c-attribs.c (handle_patchable_function_entry_attribute): Add
function comment.  Warn if arguments of the attribute are not positive
integer constants.

* c-c++-common/pr89946.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/c-c++-common/pr89946.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/c-family/ChangeLog
branches/gcc-8-branch/gcc/c-family/c-attribs.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/varasm.c

[Bug rtl-optimization/90026] [8 Regression] ICE: verify_flow_info failed (error: missing barrier after block 2)

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90026

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:02:08 2019
New Revision: 270748

URL: https://gcc.gnu.org/viewcvs?rev=270748=gcc=rev
Log:
Backported from mainline
2019-04-12  Jakub Jelinek  

PR rtl-optimization/90026
* cfgcleanup.c (try_optimize_cfg): When removing empty bb with no
successors, look for BARRIERs inside of the whole BB_FOOTER chain
rather than just at the start of it.  If e->src BB_FOOTER is not NULL
in cfglayout mode, use emit_barrier_after_bb.

* g++.dg/opt/pr90026.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/opt/pr90026.C
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/cfgcleanup.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/89965] [8 Regression] wrong code with -O -mtune=nano-x2 -fcaller-saves -fexpensive-optimizations -fno-tree-dce -fno-tree-ter

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89965

--- Comment #14 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:01:23 2019
New Revision: 270747

URL: https://gcc.gnu.org/viewcvs?rev=270747=gcc=rev
Log:
Backported from mainline
2019-04-11  Jakub Jelinek  

PR rtl-optimization/89965
* dce.c (sp_based_mem_offset): New function.
(find_call_stack_args): Use sp_based_mem_offset.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dce.c

[Bug c++/90010] [8 Regression] valgrind error with snprintf and -Wall

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90010

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 21:00:42 2019
New Revision: 270746

URL: https://gcc.gnu.org/viewcvs?rev=270746=gcc=rev
Log:
2019-04-10  Jakub Jelinek  

PR c++/90010
* gimple-ssa-sprintf.c (target_to_host): Fix handling of targstr
with strlen in between hostsz-3 and hostsz-1 inclusive when no
translation is needed, and when translation is needed, only append
... if the string length is hostsz or more bytes long.  Avoid using
strncpy or strcat.

* gcc.dg/pr90010.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr90010.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/gimple-ssa-sprintf.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug middle-end/89998] [7/8 regression] ICE: verify_gimple failed in printf-return-value

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89998

--- Comment #11 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:58:00 2019
New Revision: 270745

URL: https://gcc.gnu.org/viewcvs?rev=270745=gcc=rev
Log:
Backported from mainline
2019-04-09  Jakub Jelinek  

PR tree-optimization/89998
* gimple-ssa-sprintf.c (try_substitute_return_value): Use lhs type
instead of integer_type_node if possible, don't add ranges if return
type is not compatible with int.
* gimple-fold.c (gimple_fold_builtin_sprintf,
gimple_fold_builtin_snprintf): Use lhs type instead of hardcoded
integer_type_node.

* gcc.c-torture/compile/pr89998-1.c: New test.
* gcc.c-torture/compile/pr89998-2.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89998-1.c
branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89998-2.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/gimple-fold.c
branches/gcc-8-branch/gcc/gimple-ssa-sprintf.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug sanitizer/89869] -fsanitize=undefined miscompilation

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89869

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:56:40 2019
New Revision: 270744

URL: https://gcc.gnu.org/viewcvs?rev=270744=gcc=rev
Log:
Backported from mainline
2019-03-29  Jakub Jelinek  

PR sanitizer/89869
* typeck.c: Include gimplify.h.
(cp_build_modify_expr) : Unshare rhs before using it
for second time.  Formatting fixes.

* g++.dg/ubsan/vptr-14.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/ubsan/vptr-14.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/typeck.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c/89872] [7/8 Regression] GCC does not generate read access to volatile compound literal

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89872

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:55:58 2019
New Revision: 270743

URL: https://gcc.gnu.org/viewcvs?rev=270743=gcc=rev
Log:
Backported from mainline
2019-03-29  Jakub Jelinek  

PR c/89872
* gimplify.c (gimplify_compound_literal_expr): Don't optimize a
non-addressable complit into its initializer if it is volatile.

* gcc.dg/tree-ssa/pr89872.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/tree-ssa/pr89872.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/gimplify.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug middle-end/89621] [7/8 Regression] ICE with allocatable character and openmp

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89621

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:55:14 2019
New Revision: 270742

URL: https://gcc.gnu.org/viewcvs?rev=270742=gcc=rev
Log:
Backported from mainline
2019-03-28  Jakub Jelinek  

PR middle-end/89621
* tree-inline.h (struct copy_body_data): Add
dont_remap_vla_if_no_change flag.
* tree-inline.c (remap_type_3, remap_type_2): New functions.
(remap_type): Don't remap vla types if id->dont_remap_vla_if_no_change
and remap_type_2 returns false.
* omp-low.c (new_omp_context): Set ctx->cb.dont_remap_vla_if_no_change.

* gfortran.dg/gomp/pr89621.f90: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/gomp/pr89621.f90
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/omp-low.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-inline.c
branches/gcc-8-branch/gcc/tree-inline.h

[Bug c++/89796] Incorrect warning generated with OpenMP atomic capture

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89796

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:54:16 2019
New Revision: 270741

URL: https://gcc.gnu.org/viewcvs?rev=270741=gcc=rev
Log:
Backported from mainline
2019-03-26  Jakub Jelinek  

PR c++/89796
* semantics.c (finish_omp_atomic): Add warning_sentinel for
-Wunused-value around finish_expr_stmt call.

* g++.dg/gomp/pr89796.C: New test.
* gcc.dg/gomp/pr89796.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/gomp/pr89796.C
branches/gcc-8-branch/gcc/testsuite/gcc.dg/gomp/pr89796.c
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/semantics.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/60702] thread_local initialization

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60702

--- Comment #20 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:53:29 2019
New Revision: 270740

URL: https://gcc.gnu.org/viewcvs?rev=270740=gcc=rev
Log:
Backported from mainline
2019-03-25  Jakub Jelinek  

PR c++/60702
* g++.dg/tls/thread_local11.C: Remove scan-tree-dump-times directives
for _ZTH* calls.
* g++.dg/tls/thread_local11a.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local11a.C
Modified:
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local11.C

[Bug c++/60702] thread_local initialization

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60702

--- Comment #19 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:52:54 2019
New Revision: 270739

URL: https://gcc.gnu.org/viewcvs?rev=270739=gcc=rev
Log:
Backported from mainline
2019-03-22  Jakub Jelinek  

PR c++/60702
* cp-tree.h (get_tls_wrapper_fn): Remove declaration.
(maybe_get_tls_wrapper_call): Declare.
* decl2.c (get_tls_wrapper_fn): Make static.
(maybe_get_tls_wrapper_call): New function.
* typeck.c (build_class_member_access_expr): Handle accesses to TLS
variables.
* semantics.c (finish_qualified_id_expr): Likewise.
(finish_id_expression_1): Use maybe_get_tls_wrapper_call.
* pt.c (tsubst_copy_and_build): Likewise.

* g++.dg/tls/thread_local11.C: New test.
* g++.dg/tls/thread_local11.h: New test.
* g++.dg/tls/thread_local12a.C: New test.
* g++.dg/tls/thread_local12b.C: New test.
* g++.dg/tls/thread_local12c.C: New test.
* g++.dg/tls/thread_local12d.C: New test.
* g++.dg/tls/thread_local12e.C: New test.
* g++.dg/tls/thread_local12f.C: New test.
* g++.dg/tls/thread_local12g.C: New test.
* g++.dg/tls/thread_local12h.C: New test.
* g++.dg/tls/thread_local12i.C: New test.
* g++.dg/tls/thread_local12j.C: New test.
* g++.dg/tls/thread_local12k.C: New test.
* g++.dg/tls/thread_local12l.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local11.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local11.h
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12a.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12b.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12c.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12d.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12e.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12f.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12g.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12h.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12i.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12j.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12k.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/thread_local12l.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/cp-tree.h
branches/gcc-8-branch/gcc/cp/decl2.c
branches/gcc-8-branch/gcc/cp/pt.c
branches/gcc-8-branch/gcc/cp/semantics.c
branches/gcc-8-branch/gcc/cp/typeck.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/89767] [8 Regression] ICE with tuple and optimization

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89767

--- Comment #11 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:51:42 2019
New Revision: 270738

URL: https://gcc.gnu.org/viewcvs?rev=270738=gcc=rev
Log:
Backported from mainline
2019-03-21  Jakub Jelinek  

PR c++/89767
* parser.c (cp_parser_lambda_introducer): Add ids and first_capture_id
variables, check for duplicates in this function.
* lambda.c (add_capture): Don't check for duplicates nor use
IDENTIFIER_MARKED.
(register_capture_members): Don't clear IDENTIFIER_MARKED here.

* g++.dg/cpp1y/lambda-init18.C: New test.
* g++.dg/cpp1y/lambda-init19.C: New test.
* g++.dg/cpp1y/pr89767.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1y/lambda-init18.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1y/lambda-init19.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1y/pr89767.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/lambda.c
branches/gcc-8-branch/gcc/cp/parser.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug target/89752] [8 Regression] ICE in emit_move_insn, at expr.c:3723

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89752

--- Comment #17 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:50:48 2019
New Revision: 270737

URL: https://gcc.gnu.org/viewcvs?rev=270737=gcc=rev
Log:
Backported from mainline
2019-03-20  Jakub Jelinek  

PR target/89752
* lra-constraints.c (process_alt_operands) : For BLKmode, don't
update this_alternative nor this_alternative_set.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/lra-constraints.c

[Bug rtl-optimization/89768] [7/8 Regression] ICE in compare_and_jump_seq at loop-unroll.c:838

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89768

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:50:18 2019
New Revision: 270736

URL: https://gcc.gnu.org/viewcvs?rev=270736=gcc=rev
Log:
Backported from mainline
2019-03-19  Jakub Jelinek  

PR rtl-optimization/89768
* loop-unroll.c (unroll_loop_constant_iterations): Use gen_int_mode
instead of GEN_INT.
(unroll_loop_runtime_iterations): Likewise.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/loop-unroll.c

[Bug target/89752] [8 Regression] ICE in emit_move_insn, at expr.c:3723

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89752

--- Comment #16 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:49:38 2019
New Revision: 270735

URL: https://gcc.gnu.org/viewcvs?rev=270735=gcc=rev
Log:
Backported from mainline
2019-03-19  Jakub Jelinek  

PR target/89752
* gimplify.c (gimplify_asm_expr): For output argument with
TREE_ADDRESSABLE type, clear allows_reg if it allows memory, otherwise
diagnose error.

* g++.dg/ext/asm15.C: Check for particular diagnostic wording.
* g++.dg/ext/asm16.C: Likewise.
* g++.dg/ext/asm17.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/ext/asm17.C
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/gimplify.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/g++.dg/ext/asm15.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/ext/asm16.C

[Bug target/89726] [7/8 Regression] Incorrect inlined version of 'ceil' for 32bit

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89726

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:47:52 2019
New Revision: 270734

URL: https://gcc.gnu.org/viewcvs?rev=270734=gcc=rev
Log:
Backported from mainline
2019-03-19  Jakub Jelinek  

PR target/89726
* config/i386/i386.c (ix86_expand_floorceildf_32): In ceil
compensation use x2 += 1 instead of x2 -= -1 and when honoring
signed zeros, do another copysign after the compensation.

* gcc.target/i386/fpprec-1.c (x): Add 6 new constants.
(expect_round, expect_rint, expect_floor, expect_ceil, expect_trunc):
Add expected results for them.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/i386/i386.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/fpprec-1.c

[Bug c/89734] [7/8 Regression] const qualifier on return type not erased inside __typeof__

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89734

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:46:59 2019
New Revision: 270733

URL: https://gcc.gnu.org/viewcvs?rev=270733=gcc=rev
Log:
Backported from mainline
2019-03-19  Jakub Jelinek  

PR c/89734
* c-decl.c (grokdeclarator): Call c_build_qualified_type on function
return type even if quals_used is 0.  Formatting fixes.

* gcc.dg/pr89734.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89734.c
Modified:
branches/gcc-8-branch/gcc/c/ChangeLog
branches/gcc-8-branch/gcc/c/c-decl.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug debug/89704] [7/8 Regression] ICE in add_const_value_attribute, at dwarf2out.c:19685

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89704

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:46:09 2019
New Revision: 270732

URL: https://gcc.gnu.org/viewcvs?rev=270732=gcc=rev
Log:
Backported from mainline
2019-03-15  Jakub Jelinek  

PR debug/89704
* dwarf2out.c (add_const_value_attribute): Return false for MINUS,
SIGN_EXTEND and ZERO_EXTEND.

* gcc.dg/debug/pr89704.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/debug/pr89704.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dwarf2out.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug ipa/89684] [8 Regression] ICE in gsi_for_stmt, at gimple-iterator.c:613

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89684

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:45:28 2019
New Revision: 270731

URL: https://gcc.gnu.org/viewcvs?rev=270731=gcc=rev
Log:
Backported from mainline
2019-03-14  Jakub Jelinek  

PR ipa/89684
* multiple_target.c (create_dispatcher_calls): Change
references_to_redirect from vector of ipa_ref * to vector of ipa_ref.
In the node->iterate_referring loop, push *ref rather than ref, call
ref->remove_reference () and always pass 0 to iterate_referring.

* gcc.target/i386/pr89684.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/pr89684.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/multiple_target.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug rtl-optimization/89679] [7/8 Regression] wrong code with -Og -frerun-cse-after-loop -fno-tree-fre

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89679

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:44:48 2019
New Revision: 270730

URL: https://gcc.gnu.org/viewcvs?rev=270730=gcc=rev
Log:
Backported from mainline
2019-03-14  Jakub Jelinek  

PR rtl-optimization/89679
* expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it
would contain a paradoxical SUBREG.

* gcc.dg/pr89679.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89679.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/expmed.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/89703] [8 Regression] ICE in compare_values_warnv, at tree-vrp.c:997

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89703

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:43:58 2019
New Revision: 270729

URL: https://gcc.gnu.org/viewcvs?rev=270729=gcc=rev
Log:
Backported from mainline
2019-03-14  Jakub Jelinek  

PR tree-optimization/89703
* tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types
aren't compatible also with builtin_decl_explicit.  Check pure
or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}}
and BUILT_IN_STPNCPY{,_CHK}.

* gcc.c-torture/compile/pr89703-1.c: New test.
* gcc.c-torture/compile/pr89703-2.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89703-1.c
branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89703-2.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-ssa-strlen.c

[Bug c++/89512] [7/8 Regression] ICE in get_expr_operands, at tree-ssa-operands.c:882

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89512

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:43:07 2019
New Revision: 270728

URL: https://gcc.gnu.org/viewcvs?rev=270728=gcc=rev
Log:
Backported from mainline
2019-03-14  Jakub Jelinek  

PR c++/89512
* semantics.c (finish_qualified_id_expr): Reject variable templates.

* g++.dg/cpp1y/var-templ61.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1y/var-templ61.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/semantics.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug debug/89498] [8 Regression] ICE in AT_loc_list, at dwarf2out.c:4871

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89498

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:42:20 2019
New Revision: 270727

URL: https://gcc.gnu.org/viewcvs?rev=270727=gcc=rev
Log:
Backported from mainline
2019-03-13  Jakub Jelinek  

PR debug/89498
* dwarf2out.c (size_of_die): For dw_val_class_view_list always use
DWARF_OFFSET_SIZE.
(value_format): For dw_val_class_view_list never use DW_FORM_loclistx.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dwarf2out.c

[Bug middle-end/88588] ICE in make_decl_rtl, at varasm.c:1329

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88588

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:41:49 2019
New Revision: 270726

URL: https://gcc.gnu.org/viewcvs?rev=270726=gcc=rev
Log:
Backported from mainline
2019-03-13  Jakub Jelinek  

PR middle-end/88588
* omp-simd-clone.c (ipa_simd_modify_stmt_ops): Handle PHI args.
(ipa_simd_modify_function_body): Handle PHIs.

* c-c++-common/gomp/pr88588.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/c-c++-common/gomp/pr88588.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/omp-simd-clone.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug middle-end/89663] [7/8 Regression] ICE in expand_builtin_int_roundingfn_2, at builtins.c:2831

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89663

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:41:09 2019
New Revision: 270725

URL: https://gcc.gnu.org/viewcvs?rev=270725=gcc=rev
Log:
Backported from mainline
2019-03-12  Jakub Jelinek  

PR middle-end/89663
* builtins.c (expand_builtin_int_roundingfn,
expand_builtin_int_roundingfn_2): Return NULL_RTX instead of
gcc_unreachable if validate_arglist fails.

* gcc.c-torture/compile/pr89663-1.c: New test.
* gcc.c-torture/compile/pr89663-2.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89663-1.c
branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89663-2.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/builtins.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug fortran/89651] OpenMP private array uninitialized warning with -O flag

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89651

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:40:17 2019
New Revision: 270724

URL: https://gcc.gnu.org/viewcvs?rev=270724=gcc=rev
Log:
Backported from mainline
2019-03-11  Jakub Jelinek  

PR fortran/89651
* trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
on decl if adding COND_EXPR for allocatable.
(gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.

* gfortran.dg/gomp/pr89651.f90: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gfortran.dg/gomp/pr89651.f90
Modified:
branches/gcc-8-branch/gcc/fortran/ChangeLog
branches/gcc-8-branch/gcc/fortran/trans-openmp.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c/88568] [7/8 Regression] 'dllimport' no longer implies 'extern' in C

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88568

--- Comment #25 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:39:17 2019
New Revision: 270723

URL: https://gcc.gnu.org/viewcvs?rev=270723=gcc=rev
Log:
Backported from mainline
2019-03-09  Jakub Jelinek  

PR c/88568
* attribs.c (handle_dll_attribute): Don't clear TREE_STATIC for
dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT.

* g++.dg/other/pr88568.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/other/pr88568.C
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/attribs.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/82075] structured binding fails with empty base class

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82075

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:38:32 2019
New Revision: 270722

URL: https://gcc.gnu.org/viewcvs?rev=270722=gcc=rev
Log:
Backported from mainline
2019-03-08  Jakub Jelinek  

PR c++/82075
* g++.dg/cpp1z/decomp49.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1z/decomp49.C
Modified:
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/87148] [7/8 Regression] backward compatibility issue to take char [] as incomplete type

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87148

--- Comment #11 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:38:01 2019
New Revision: 270721

URL: https://gcc.gnu.org/viewcvs?rev=270721=gcc=rev
Log:
Backported from mainline
2019-03-06  Jakub Jelinek  

PR c++/87148
* init.c (build_value_init_noctor): Ignore flexible array members.

* g++.dg/ext/flexary34.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/ext/flexary34.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/init.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug target/89587] gcc's rs6000 configuration unconditionally sets MULTIARCH_DIRNAME, even when multiarch is disabled

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89587

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:37:12 2019
New Revision: 270720

URL: https://gcc.gnu.org/viewcvs?rev=270720=gcc=rev
Log:
Backported from mainline
2019-03-05  Jakub Jelinek  

PR target/89587
* config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only
if_multiarch.

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/rs6000/t-linux

[Bug middle-end/89590] [7/8 Regression] ICE in maybe_emit_free_warning

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89590

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:36:17 2019
New Revision: 270719

URL: https://gcc.gnu.org/viewcvs?rev=270719=gcc=rev
Log:
Backported from mainline
2019-03-05  Jakub Jelinek  

PR middle-end/89590
* builtins.c (maybe_emit_free_warning): Punt if free doesn't have
exactly one argument.

* gcc.dg/pr89590.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89590.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/builtins.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c/89521] ICE in expand_builtin_int_roundingfn, at builtins.c:2697

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89521

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:34:49 2019
New Revision: 270718

URL: https://gcc.gnu.org/viewcvs?rev=270718=gcc=rev
Log:
Backported from mainline
2019-02-28  Jakub Jelinek  

PR c/89521
* gcc.dg/pr89521-1.c: New test.
* gcc.dg/pr89521-2.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89521-1.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89521-2.c
Modified:
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c/89520] [7/8 Regression] ICE tree check: accessed operand 4 of call_expr with 3 operands in convert_to_integer_1, at convert.c:668

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89520

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:33:24 2019
New Revision: 270717

URL: https://gcc.gnu.org/viewcvs?rev=270717=gcc=rev
Log:
Backported from mainline
2019-02-28  Jakub Jelinek  

PR c/89520
* convert.c (convert_to_real_1, convert_to_integer_1): Punt for
builtins if they don't have a single scalar floating point argument.
Formatting fixes.

* gcc.dg/pr89520-1.c: New test.
* gcc.dg/pr89520-2.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89520-1.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr89520-2.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/convert.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/89403] [7/8 Regression] ICE in maybe_clone_body, at cp/optimize.c:693

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89403

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:32:14 2019
New Revision: 270716

URL: https://gcc.gnu.org/viewcvs?rev=270716=gcc=rev
Log:
Backported from mainline
2019-02-20  Jakub Jelinek  

PR c++/89403
* decl2.c (c_parse_final_cleanups): Move TREE_ASM_WRITTEN setting
for flag_syntax_only from here...
* semantics.c (expand_or_defer_fn_1): ... here.

* g++.dg/cpp0x/pr89403.C: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/pr89403.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/decl2.c
branches/gcc-8-branch/gcc/cp/semantics.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug c++/89405] [8 Regression] ICE in import_export_decl, at cp/decl2.c:2959

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89405

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:31:26 2019
New Revision: 270715

URL: https://gcc.gnu.org/viewcvs?rev=270715=gcc=rev
Log:
Backported from mainline
2019-02-20  Jakub Jelinek  

PR c++/89405
* decl.c (maybe_commonize_var): When clearing TREE_PUBLIC and
DECL_COMMON, set DECL_INTERFACE_KNOWN.

* g++.dg/cpp1z/inline-var5.C: New test.

Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/decl.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1z/inline-var5.C

[Bug middle-end/89412] [7/8 Regression] gcc ICE in simplify_subreg, at simplify-rtx.c:6273 on i686-linux-gnu

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89412

--- Comment #9 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:30:27 2019
New Revision: 270714

URL: https://gcc.gnu.org/viewcvs?rev=270714=gcc=rev
Log:
Backported from mainline
2019-02-20  Jakub Jelinek  

PR middle-end/89412
* expr.c (expand_assignment): If result is a MEM, use change_address
instead of simplify_gen_subreg.

* gcc.c-torture/compile/pr89412.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.c-torture/compile/pr89412.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/expr.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug middle-end/89091] ICE: Segmentation fault (in tree_class_check)

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89091

--- Comment #12 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:29:44 2019
New Revision: 270713

URL: https://gcc.gnu.org/viewcvs?rev=270713=gcc=rev
Log:
Backported from mainline
2019-02-20  Jakub Jelinek  
David Malcolm  

PR middle-end/89091
* fold-const.c (decode_field_reference): Return NULL_TREE if
lang_hooks.types.type_for_size returns NULL.  Check it before
overwriting *exp_.  Use return NULL_TREE instead of return 0.

* gcc.dg/torture/pr89091.c: New test.

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr89091.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/fold-const.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/88074] [7/8 Regression] g++ hangs on math expression

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88074

--- Comment #34 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:28:56 2019
New Revision: 270712

URL: https://gcc.gnu.org/viewcvs?rev=270712=gcc=rev
Log:
Backported from mainline
2019-02-20  Jakub Jelinek  

PR middle-end/88074
PR middle-end/89415
* toplev.c (do_compile): Double the emin/emax exponents to workaround
buggy mpc_norm.

* gcc.dg/pr88074-2.c: New test.

2019-02-19  Richard Biener  

PR middle-end/88074
* toplev.c (do_compile): Initialize mpfr's exponent range
based on available float modes.

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

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr88074-2.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr88074.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/toplev.c

[Bug middle-end/89415] [9 Regression] gcc.dg/sinatan-1.c FAILs

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89415

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 20:28:56 2019
New Revision: 270712

URL: https://gcc.gnu.org/viewcvs?rev=270712=gcc=rev
Log:
Backported from mainline
2019-02-20  Jakub Jelinek  

PR middle-end/88074
PR middle-end/89415
* toplev.c (do_compile): Double the emin/emax exponents to workaround
buggy mpc_norm.

* gcc.dg/pr88074-2.c: New test.

2019-02-19  Richard Biener  

PR middle-end/88074
* toplev.c (do_compile): Initialize mpfr's exponent range
based on available float modes.

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

Added:
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr88074-2.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr88074.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/toplev.c

[Bug c++/90291] [8/9/10 Regression] Inline namespace erroneously extends another namespace

2019-04-30 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90291

--- Comment #5 from Nathan Sidwell  ---
Igor, was this distilled from real code?  what was the intent of such an
organization?

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

--- Comment #8 from Fred Krogh  ---
My apologies for posting this.  In my original code the program just quit at
the point of the test.  I thought I had more or less reproduced this in a small
program.  Clearly that is not the case.  My code has changed to get around the
bug, such change was needed regardless.  I have not idea how to get this
reproduced in a small program.

[Bug web/90127] Disable bugzilla [[wiki_links]] and don't confuse r12 register names with r12345 svn revisions

2019-04-30 Thread LpSolit at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90127

Frédéric Buclin  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Frédéric Buclin  ---
done

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

--- Comment #7 from Steve Kargl  ---
On Tue, Apr 30, 2019 at 11:17:38AM -0700, Steve Kargl wrote:
> 
> BTW, one is suppose to be able to control this behavior in the
> code itself.
> 
> stop, .false.
> stop, quiet=.false.
> 
> should inhibit the warning.  gfortran does not support the
> QUIET directive.
> 

This might be 'quiet=.true.' to suppress warnings.  I haven't
studied the standard closely, yet.

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

--- Comment #6 from Steve Kargl  ---
On Tue, Apr 30, 2019 at 11:15:38AM -0700, Steve Kargl wrote:
> On Tue, Apr 30, 2019 at 05:54:33PM +, dominiq at lps dot ens.fr wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294
> > 
> > Dominique d'Humieres  changed:
> > 
> >What|Removed |Added
> > 
> >  Status|UNCONFIRMED |WAITING
> >Last reconfirmed||2019-04-30
> >  Ever confirmed|0   |1
> > 
> > --- Comment #4 from Dominique d'Humieres  ---
> > Note that -std=f95 does not silence the STOP.
> > 
> 
> So?  The Fortran 95 does not disallow reporting this warning.
> As it is informational, I do not see any reason for to suppress
> the warning.  The user can always you -Wfpe-summary.
> 

BTW, one is suppose to be able to control this behavior in the
code itself.

stop, .false.
stop, quiet=.false.

should inhibit the warning.  gfortran does not support the
QUIET directive.

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

--- Comment #5 from Steve Kargl  ---
On Tue, Apr 30, 2019 at 05:54:33PM +, dominiq at lps dot ens.fr wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294
> 
> Dominique d'Humieres  changed:
> 
>What|Removed |Added
> 
>  Status|UNCONFIRMED |WAITING
>Last reconfirmed||2019-04-30
>  Ever confirmed|0   |1
> 
> --- Comment #4 from Dominique d'Humieres  ---
> Note that -std=f95 does not silence the STOP.
> 

So?  The Fortran 95 does not disallow reporting this warning.
As it is informational, I do not see any reason for to suppress
the warning.  The user can always you -Wfpe-summary.

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2019-04-30
 Ever confirmed|0   |1

--- Comment #4 from Dominique d'Humieres  ---
Note that -std=f95 does not silence the STOP.

[Bug fortran/90290] -std=f2008 should reject non-constant stop and error stop codes

2019-04-30 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90290

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P5  |P4
 CC||kargl at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |kargl at gcc dot gnu.org
   Target Milestone|--- |9.2
   Severity|minor   |normal

--- Comment #3 from kargl at gcc dot gnu.org ---
My version gives

%  gfcx -o z -std=f2008 a.f90
a.f90:4:6:

4 |   stop ec
  |  1
Error: STOP code at (1) must be a scalar default CHARACTER or INTEGER constant
expression

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

--- Comment #3 from Steve Kargl  ---
On Tue, Apr 30, 2019 at 05:28:18PM +, siteg at mathalacarte dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294
> 
> --- Comment #2 from Fred Krogh  ---
> Created attachment 46268
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46268=edit
> gfortran -g -o testi testi.f90 gives the error below
> 
> Look at r > 0 NaN
> Note: The following floating-point exceptions are
> signalling: IEEE_INVALID_FLAG

I don't understand.  The program executed as expected,
and upon completion it reported the floating point
exception is signalling.  See the -ffpe-summary option
to suppress the warning.  See the F2008 and/or F2018
Fortran Standards for the use of STOP.

[Bug web/89770] move java-related mailing lists on lists.html to the "Historical lists" section

2019-04-30 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89770

--- Comment #2 from Eric Gallager  ---
(In reply to Martin Liška from comment #1)
> Fixed.

So it is. Thanks!

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

--- Comment #2 from Fred Krogh  ---
Created attachment 46268
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46268=edit
gfortran -g -o testi testi.f90 gives the error below

Look at r > 0 NaN
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG

[Bug libstdc++/90295] New: Please define ~exception_ptr inline

2019-04-30 Thread rafael at espindo dot la
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90295

Bug ID: 90295
   Summary: Please define ~exception_ptr inline
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rafael at espindo dot la
  Target Milestone: ---

Currently ~exception_ptr is defined out of line. Its definition just calls
_M_release which looks like

 if (_M_exception_object)
{
...
}

Which means that there is nothing to do for an exception_ptr that has been
moved, but the user code has no way of knowing that.

If the ~exception_ptr was defined inline as

~exception_ptr() {
  if (_M_exception_object)
 {
 out_of_line_destructor();
 }
}

Then the compiler would be able to omit the call to out_of_line_destructor when
it knows _M_exception_object is null.

This comes up in seastar (https://github.com/scylladb/seastar/) where we have a
struct (future_state) that holds a exception_ptr and is frequently moved.

[Bug fortran/90294] Compare with NaN failing

2019-04-30 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to Fred Krogh from comment #0)
> Comparing a double real rdat(i) containing a NaN results in
> 
> Program received signal SIGFPE, Arithmetic exception.
> 0x555c2559 in messy_d_m::vec_setup () at Src/messy_bod.F90:1818
> 1818  else if (rdat(i) < 0.0_rk) then

What were the options used when compiling the code?
What is the code?  Can't debug in a vacuum.

[Bug fortran/90294] New: Compare with NaN failing

2019-04-30 Thread siteg at mathalacarte dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90294

Bug ID: 90294
   Summary: Compare with NaN failing
   Product: gcc
   Version: 8.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: siteg at mathalacarte dot com
  Target Milestone: ---

Comparing a double real rdat(i) containing a NaN results in

Program received signal SIGFPE, Arithmetic exception.
0x555c2559 in messy_d_m::vec_setup () at Src/messy_bod.F90:1818
1818else if (rdat(i) < 0.0_rk) then

[Bug c++/90291] [8/9/10 Regression] Inline namespace erroneously extends another namespace

2019-04-30 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90291

Nathan Sidwell  changed:

   What|Removed |Added

 Status|NEW |SUSPENDED

--- Comment #4 from Nathan Sidwell  ---
I believe GCC is correctly implementing DR2061's proposal, and this change is
an expected result of that.  I have asked CWG for comment.

[Bug tree-optimization/90292] GCC Fails to hoist loop invariant in nested loops

2019-04-30 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90292

--- Comment #3 from Alexander Monakov  ---
When changing iterators to 'int', you also need to change n to int as well,
otherwise in 'n*(i) + (j)', i and j are promoted to unsigned anyway.

[Bug fortran/90290] -std=f2008 should reject non-constant stop and error stop codes

2019-04-30 Thread thenlich+gccbug at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90290

--- Comment #2 from Thomas Henlich  ---
The road to standards non-compliance hell is paved with very minor offenses...
;-)

[Bug tree-optimization/90292] GCC Fails to hoist loop invariant in nested loops

2019-04-30 Thread giuliano.belinassi at usp dot br
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90292

--- Comment #2 from Giuliano Belinassi  ---
Just for the sake of completeness, this issue is not addressed by just changing
the iterators to 'int'. However, it is in fact solved by changing the iterators
to 'unsigned long', 'long', or doing a cast in each macro. GCC even generates
faster code if one of these two last changes are made.

Also, the statement in matrix_dgemm_2 should be  *c += a * (*b); for
correctness.

[Bug target/89093] [9 Regression] C++ exception handling clobbers d8 VFP register

2019-04-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89093

--- Comment #87 from Jakub Jelinek  ---
Author: jakub
Date: Tue Apr 30 16:30:44 2019
New Revision: 270705

URL: https://gcc.gnu.org/viewcvs?rev=270705=gcc=rev
Log:
PR target/89093
* gcc.target/aarch64/return_address_sign_3.c: Remove extra space in
target attribute.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/aarch64/return_address_sign_3.c

[Bug target/89093] [9 Regression] C++ exception handling clobbers d8 VFP register

2019-04-30 Thread tnfchris at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89093

--- Comment #86 from Tamar Christina  ---
for aarch64-none-linux-gnu. I am still building the toolchain to take a look so
not able to give more detail.

[Bug target/89093] [9 Regression] C++ exception handling clobbers d8 VFP register

2019-04-30 Thread tnfchris at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89093

Tamar Christina  changed:

   What|Removed |Added

 CC||tnfchris at gcc dot gnu.org

--- Comment #85 from Tamar Christina  ---
Hi Jakub,

commit r270690 seems to have caused a regression on
gcc.target/aarch64/return_address_sign_3.c

[Bug rtl-optimization/82636] powerpc: Unnecessary copy of __ieee128 parameter

2019-04-30 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82636

Peter Bergner  changed:

   What|Removed |Added

 CC||bergner at gcc dot gnu.org
  Component|middle-end  |rtl-optimization

--- Comment #6 from Peter Bergner  ---
I think this may be fixed already.  I see for the two test cases:

Tulio's:

__fmaf128_power9:
.LFB0:
xsmaddqp4, 2, 3
xxlor 34,36,36
blr

...and Mikes:

__fmaf128_power9:
.LFB0:
.cfi_startproc
xsmaddqp 4,2,3
xxlor 34,36,36
blr

Tulio and Mike, can you confirm that?

[Bug c/90293] New function attribute: expect_return

2019-04-30 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90293

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org
   Severity|normal  |enhancement

--- Comment #2 from Martin Sebor  ---
I think this could be useful.  A related feature I'd like to see is a "binding"
attribute that made it possible to express a) ranges of return values and b)
relationships involving arguments.  E.g., "expect a negative return value if
function argument 1 is greater than 255."  By binding I mean one that
guaranteed the result as opposed to simply expressing a likelihood.

[Bug libstdc++/61761] [C++11] std::proj returns incorrect values

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61761

--- Comment #6 from Jonathan Wakely  ---
(In reply to Jan van Dijk from comment #5)
> Does the usage of numeric_limits<_Tp> in complex work well for user-defined
> _Tp?

We can assume it does.

> For complex, at present MyType can be required to be constructible
> from INFINITY to make proj work. Wouldn't using numeric_limits<_Tp> dictate
> a (forbidden) numeric_limits specialization to provide
> numeric_limits::infinity()?

There's nothing forbidden about specializing numeric_limits.

[Bug libstdc++/61761] [C++11] std::proj returns incorrect values

2019-04-30 Thread j.v.dijk at tue dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61761

--- Comment #5 from Jan van Dijk  ---
Does the usage of numeric_limits<_Tp> in complex work well for user-defined
_Tp?

For complex, at present MyType can be required to be constructible from
INFINITY to make proj work. Wouldn't using numeric_limits<_Tp> dictate a
(forbidden) numeric_limits specialization to provide
numeric_limits::infinity()?

[Bug debug/90273] [9/10 Regression] GCC runs out of memory building Firefox

2019-04-30 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90273

--- Comment #28 from Jan Hubicka  ---
> The recent regression is we no longer throw them away plentiful during CFG
> cleanup and now they pile up during inlining. 
> 
> I agree full DCE with liveness will be expensive for usually little gain. Not
> sure if vector resets will improve things much.

One thing to keep in mind that after early opts and in late opts after
the initial cleanups post ipa-inline-transforms we likely have a lot of
new debug statements brought in by inliner.  It would make sense to do
something more expensive twice in queue to get rid of them. Especially
in early opts we do not want to make too many useless debug statements
to hit the LTO stream or get duplicated by subsequent inlining.

Honza

[Bug c/90293] New function attribute: expect_return

2019-04-30 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90293

--- Comment #1 from Daniel Fruzynski  ---
One more case: sometimes it may be more handy to specify what will *not* be
usually returned, e.g. special invalid value. For such cases another attribute
would be needed:

__attribute__((expect_not_return(-1)))
int CreateSocket();

[Bug c/90293] New: New function attribute: expect_return

2019-04-30 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90293

Bug ID: 90293
   Summary: New function attribute: expect_return
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzi...@poradnik-webmastera.com
  Target Milestone: ---

I have an idea of new function attribute: expect_return. It would allow to
specify value usually returned from function, so it could help with
optimization in similar way like __builtin_expect() does.

Example use:

__attribute__((expect_return(false)))
bool DebugModeEnabled();

__attribute__((expect_return(false)))
bool IsErrorCode(int code);

[Bug target/87163] ICE in extract_insn, at recog.c:2305

2019-04-30 Thread bergner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87163

--- Comment #2 from Peter Bergner  ---
This doesn't fail for me using a native build.  Martin, can you recheck to see
if this is now fixed?  There have been some changes in this area and I do see
that pattern in my dump file with no ICE:

(insn 6 3 7 2 (set (reg:DF 124)
(float_truncate:DF (reg/v:IF 122 [ aD.2830 ]))) "t.i":5:10 529
{truncifdf2_internal1}
 (nil))

[Bug c++/90291] [8/9/10 Regression] Inline namespace erroneously extends another namespace

2019-04-30 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90291

--- Comment #3 from Nathan Sidwell  ---
I think I'm going to have to consult core ...

[Bug libstdc++/61761] [C++11] std::proj returns incorrect values

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61761

--- Comment #4 from Jonathan Wakely  ---
I think your patch as as good as anything else we'll come up with, apart from
using numeric_limits::infinity() instead of INFINITY. Anybody who wants to
use std::proj with types other than float, double and long double will have to
ensure that std::isinf and std::copysign work.

I'll add some tests and commit it shortly, thanks.

[Bug debug/90273] [9/10 Regression] GCC runs out of memory building Firefox

2019-04-30 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90273

--- Comment #27 from rguenther at suse dot de  ---
On April 30, 2019 4:27:25 PM GMT+02:00, "aoliva at gcc dot gnu.org"
 wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90273
>
>--- Comment #26 from Alexandre Oliva  ---
>I saw the #c11 patch in gcc-patches, and it seemed to have been posted
>FTR and
>installed.  It looked good, so I didn't comment on it.
>
>I agree about the effects of #c16, though I begin to get a feeling that
>it's
>working too hard for too little benefit.  Ditto trying to optimize
>debug temps:
>you will get some savings, sure, but how much benefit for such global
>analyses?
>
>Perhaps we'd get a much bigger bang for the buck introducing vector
>resets, in
>which a single gimple bind stmt would reset several decls at once.  If
>that's
>become as common as it is being made out to be, this could save a
>significant
>amount of memory.
>
>Though from Jan's comments on compile times, it doesn't look like we've
>got
>much slower, which makes me wonder what the new problem really is... 
>Could it
>be that debug binds have always been there, plentiful but under the
>radar, and
>that the real recent regression (assuming there really is one) lies
>elsewhere? 
>(sorry, I haven't really dug into it myself)

The recent regression is we no longer throw them away plentiful during CFG
cleanup and now they pile up during inlining. 

I agree full DCE with liveness will be expensive for usually little gain. Not
sure if vector resets will improve things much.

[Bug c/90289] an unnecessary relocation record

2019-04-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90289

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |MOVED

--- Comment #1 from Andrew Pinski  ---
GCC produces:
callf

So it is up to the assembler to decide if there is a relocation or not to the
"global" symbol f.  The assembler comes from the binutils project.

NOTE this is most likely not a bug really and done on purpose.

[Bug tree-optimization/90292] GCC Fails to hoist loop invariant in nested loops

2019-04-30 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90292

Alexander Monakov  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||amonakov at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #1 from Alexander Monakov  ---
The compiler cannot perform this hoisting, because the computation 'n*(i) +
(j)' happens in 'unsigned int' type, where wrapping overflow matters when
pointers are 64-bit.

If the testcase is changed to either use 'int' (undefined overflow) or
'unsigned long' (same as pointer size), the desired hoisting is performed, as
far as I can tell. Therefore, closing as invalid.

(it's not rare that using size_t for array indexes helps optimization, this is
one of such examples)

[Bug tree-optimization/90292] New: GCC Fails to hoist loop invariant in nested loops

2019-04-30 Thread giuliano.belinassi at usp dot br
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90292

Bug ID: 90292
   Summary: GCC Fails to hoist loop invariant in nested loops
   Product: gcc
   Version: tree-ssa
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: giuliano.belinassi at usp dot br
  Target Milestone: ---

Both GCC 8.3.0 and 9.0.1 fails to hoist the index calculation for 'i' and 'k'
variables of the following function (matrix multiplication with blocking):

void matrix_dgemm_2(unsigned n, double *restrict _C, double *restrict _A,
double *restrict _B)
{
#define BLOCK_I 128
#define BLOCK_K 8

#define A(i, j) _A[n*(i) + (j)]
#define B(i, j) _B[n*(i) + (j)]
#define C(i, j) _C[n*(i) + (j)]
unsigned ii, kk, i, j, k;

for (ii = 0; ii < n; ii += BLOCK_I)
for (kk = 0; kk < n; kk += BLOCK_K)
for (i = ii; i < ii + BLOCK_I; ++i)
for (k = kk; k < kk + BLOCK_K; ++k)
for (j = 0; j < n; ++j)
   C(i, j) += A(i, k) * B(k, j);
}

which then generate the following GIMPLE code on the deepest nested block (-O2)

   [local count: 955630225]:
  # ivtmp.3_88 = PHI <_1(6), ivtmp.3_87(4)>
  _3 = (long unsigned int) ivtmp.3_88;
  _4 = _3 * 8;
  _5 = _C_34(D) + _4; 
  _6 = *_5;
  _13 = ivtmp.14_81 + ivtmp.3_88;
  _14 = (long unsigned int) _13;
  _15 = _14 * 8;
  _16 = _B_36(D) + _15;
  _17 = *_16;
  _18 = _11 * _17;
  _19 = _6 + _18;
  *_5 = _19;
  ivtmp.3_87 = ivtmp.3_88 + 1;
  if (ivtmp.25_71 != ivtmp.3_87)
goto ; [89.00%]
  else
goto ; [11.00%]

If I modify the function code to do the following:

void matrix_dgemm_2(unsigned n, double *restrict _C, double *restrict _A,
double *restrict _B) 
{
#define BLOCK_I 128
#define BLOCK_K 8

#define A(i, j) _A[n*(i) + (j)]
#define B(i, j) _B[n*(i) + (j)]
#define C(i, j) _C[n*(i) + (j)]
unsigned ii, kk, i, j, k;

for (ii = 0; ii < n; ii += BLOCK_I)
for (kk = 0; kk < n; kk += BLOCK_K)
for (i = ii; i < ii + BLOCK_I; ++i)
for (k = kk; k < kk + BLOCK_K; ++k)
{
double  a =  A(i, k); 
double* b = (k, 0); 
double* c = (i, 0); 
for (j = 0; j < n; ++j)
{
*c = a * (*b);
c++; b++;
}
}
}

Then GCC generates the following deepest block: (-O2)

   [local count: 955630224]:
  # ivtmp.1_47 = PHI <0(5), ivtmp.1_46(6)>
  _11 = MEM[base: b_32, index: ivtmp.1_47, step: 8, offset: 0B];
  _12 = _11 * a_30;
  MEM[base: c_34, index: ivtmp.1_47, step: 8, offset: 0B] = _12;
  ivtmp.1_46 = ivtmp.1_47 + 1;
  if (_44 != ivtmp.1_47)
goto ; [89.00%]
  else
goto ; [11.00%]

and therefore it will generate faster final code. With a 2048x2048 matrix at
-O2, this modification only gives about 0.3s of speedup, however at -O3
-march=native in a  Core(TM) i5-8250U, this modification provides a 2x speedup,
arguably due to vectorization.

[Bug target/86538] GCC should define a macro to specify if LSE is enabled or not

2019-04-30 Thread ramana at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86538

--- Comment #6 from Ramana Radhakrishnan  ---
Author: ramana
Date: Tue Apr 30 14:57:50 2019
New Revision: 270702

URL: https://gcc.gnu.org/viewcvs?rev=270702=gcc=rev
Log:
[Patch AArch64] Add __ARM_FEATURE_ATOMICS



This keeps coming up repeatedly and the ACLE has finally added
__ARM_FEATURE_ATOMICS for the LSE feature in GCC. This is now part of
the latest ACLE release
(https://developer.arm.com/docs/101028/latest/5-feature-test-macros)

I know it's late for GCC-9 but this is a simple macro which need not
wait  for another year.

Ok for trunk and to backport to all release branches ?

Tested with a simple build and a smoke test.

Backport from mainline.
PR target/86538
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define
__ARM_FEATURE_ATOMICS

Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/aarch64/aarch64-c.c

[Bug libstdc++/61761] [C++11] std::proj returns incorrect values

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61761

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
   Target Milestone|--- |10.0
   Severity|minor   |normal

[Bug libstdc++/61761] [C++11] std::proj returns incorrect values

2019-04-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61761

--- Comment #3 from Jonathan Wakely  ---
(In reply to Jan van Dijk from comment #2)
> Is it not perfectly fine that your patch works only for _Tp equal to float,
> double or long double? Anything else is unspecified per 24.5(2). Does
> libstdc++ advertise to go beyond the standard and support other scalar types
> as well? (And if so: is that policy documented anywhere?)

Look at the source.   defines the full std::complex primary
template as well as explicit specializations for std::complex,
std::complex and std::complex.

[Bug debug/90273] [9/10 Regression] GCC runs out of memory building Firefox

2019-04-30 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90273

--- Comment #26 from Alexandre Oliva  ---
I saw the #c11 patch in gcc-patches, and it seemed to have been posted FTR and
installed.  It looked good, so I didn't comment on it.

I agree about the effects of #c16, though I begin to get a feeling that it's
working too hard for too little benefit.  Ditto trying to optimize debug temps:
you will get some savings, sure, but how much benefit for such global analyses?

Perhaps we'd get a much bigger bang for the buck introducing vector resets, in
which a single gimple bind stmt would reset several decls at once.  If that's
become as common as it is being made out to be, this could save a significant
amount of memory.

Though from Jan's comments on compile times, it doesn't look like we've got
much slower, which makes me wonder what the new problem really is...  Could it
be that debug binds have always been there, plentiful but under the radar, and
that the real recent regression (assuming there really is one) lies elsewhere? 
(sorry, I haven't really dug into it myself)

[Bug debug/90279] DW_AT_location missing for struct-based Variable

2019-04-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90279

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-04-30
 CC||marxin at gcc dot gnu.org,
   ||vries at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Martin Liška  ---
I can confirm that.

[Bug middle-end/90283] 519.lbm_r is 7%-10% slower with -Ofast -march=native and both LTO and PGO than with GCC 8

2019-04-30 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90283

--- Comment #4 from rsandifo at gcc dot gnu.org  
---
(In reply to Martin Liška from comment #3)
> The perf comes from an Intel Skylake server machine.
> 
> The number of fma is very similar:
> grep fma bad.report.txt | wc -l
> 126
> grep fma good.report.txt | wc -l
> 128

Grepping for vfm also includes the vfmsubs etc., with the same gap:

bad.report.txt:167
good.report.txt:169

The distribution also looks similar:

$ sed -n 's/.*\(vfm[^ ]*\).*/\1/p' good.report.txt  | sort | uniq -c
 61 vfmadd132sd
  1 vfmadd132ss
 35 vfmadd213sd
 30 vfmadd231sd
  1 vfmadd231ss
 32 vfmsub132sd
  1 vfmsub213sd
  8 vfmsub231sd
$ sed -n 's/.*\(vfm[^ ]*\).*/\1/p' bad.report.txt  | sort | uniq -c
 60 vfmadd132sd
  1 vfmadd132ss
 35 vfmadd213sd
 29 vfmadd231sd
  1 vfmadd231ss
 29 vfmsub132sd
  1 vfmsub213sd
 11 vfmsub231sd

> But the assembly is shuffled quite significantly after the change. Can you
> Richard Sandiford please take a look?

I think I'm going to need more clues why the new code is so much
slower in practice.  Could someone more familiar with the architecture
comment?

[Bug libstdc++/61761] [C++11] std::proj returns incorrect values

2019-04-30 Thread j.v.dijk at tue dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61761

Jan van Dijk  changed:

   What|Removed |Added

 CC||j.v.dijk at tue dot nl

--- Comment #2 from Jan van Dijk  ---
Is it not perfectly fine that your patch works only for _Tp equal to float,
double or long double? Anything else is unspecified per 24.5(2). Does libstdc++
advertise to go beyond the standard and support other scalar types as well?
(And if so: is that policy documented anywhere?)

That said, I think that the correct patch would be:

Index: libstdc++-v3/include/std/complex
===
--- libstdc++-v3/include/std/complex(revision 270684)
+++ libstdc++-v3/include/std/complex(working copy)
@@ -1902,11 +1902,9 @@
 std::complex<_Tp>
 __complex_proj(const std::complex<_Tp>& __z)
 {
-  const _Tp __den = (__z.real() * __z.real()
-+ __z.imag() * __z.imag() + _Tp(1.0));
-
-  return std::complex<_Tp>((_Tp(2.0) * __z.real()) / __den,
-  (_Tp(2.0) * __z.imag()) / __den);
+  if (isinf(__z.real()) || isinf(__z.imag()))
+return std::complex<_Tp>(INFINITY, copysign(0.0, __z.imag()));
+  return __z;
 }

 #if _GLIBCXX_USE_C99_COMPLEX

Note that the combinations finite,nan and nan,finite should return __z
unmodified. As the OP mentions, this was a problem in glibc as well that was
later fixed, see: https://sourceware.org/ml/libc-alpha/2013-08/msg00374.html
The patch above makes libstdc++ do exactly what is also found in current
glibc's implementation in s_cproj_template.c

[Bug c++/90284] -Wunused-value points to the wrong expression

2019-04-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90284

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-04-30
 CC||dmalcolm at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed. It's only related to C++, because for C we get:

gcc -Wunused-value pr90284.c 
pr90284.c: In function ‘incorrect_warning’:
pr90284.c:3:22: warning: left-hand operand of comma expression has no effect
[-Wunused-value]
3 | return (0 ? 0 : 0, 999);
  |  ^
pr90284.c: In function ‘correct_warning’:
pr90284.c:8:14: warning: left-hand operand of comma expression has no effect
[-Wunused-value]
8 | return (0, 999);
  |  ^

So a possible enhancement.

For C++ there was improvement of the second test-case by David in r267272:

pr90284.c:8:16: warning: left operand of comma operator has no effect
[-Wunused-value]
 return (0, 999);
^~~
after:
pr90284.c:8:13: warning: left operand of comma operator has no effect
[-Wunused-value]
8 | return (0, 999);
  | ^

I'm leaving that to David, hopefully he can fix it.

[Bug debug/90288] -g{no,}as-locview-support missing the leading dash in the documentation

2019-04-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90288

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Martin Liška  ---
Fixed.

[Bug debug/90288] -g{no,}as-locview-support missing the leading dash in the documentation

2019-04-30 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90288

--- Comment #2 from Martin Liška  ---
Author: marxin
Date: Tue Apr 30 13:31:22 2019
New Revision: 270692

URL: https://gcc.gnu.org/viewcvs?rev=270692=gcc=rev
Log:
Add missing dash for 2 options in documentation (PR debug/90288).

2019-04-30  Martin Liska  

PR debug/90288
* doc/invoke.texi: Add missing dash for gas-locview-support
and gno-as-locview-support.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/invoke.texi

  1   2   >