[Bug libstdc++/86272] [6/7/8/9 Regression] __gnu_debug::string uses undefined __glibcxx_check_insert_range2

2018-07-04 Thread fdumont at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86272

--- Comment #6 from François Dumont  ---
Author: fdumont
Date: Thu Jul  5 05:14:36 2018
New Revision: 262430

URL: https://gcc.gnu.org/viewcvs?rev=262430=gcc=rev
Log:
2018-07-05  François Dumont  

Backport from mainline
2018-07-04  François Dumont  

PR libstdc++/86272
* include/debug/string
(__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite,
_Ite)):
Use __glibcxx_check_insert_range.

Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/debug/string

[Bug bootstrap/33065] warning in Comparing stages 2 and 3 stage3-gcc: No such file or directory (objdir==srcdir)

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33065

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-07-05
 CC||egallager at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=32941
 Ever confirmed|0   |1

--- Comment #9 from Eric Gallager  ---
(In reply to Andrew Pinski from comment #8)
> >Bootstrap comparison failure!
> >./ada/exp_aggr.o differs
> >make[2]: *** [compare] Error 1
> 
> 
> This was PR 32941 and has been fixed on the trunk.

So... is this fixed too then?

[Bug bootstrap/32556] The libgcc configuration file doesn't swap CPP when it swaps CC - use of normal value breaks make

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32556

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-07-05
 CC||egallager at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Eric Gallager  ---
Does this still happen with newer versions of GCC?

[Bug bootstrap/30341] Makefile using mv instead of ln not working on WinXP Cygwin Bash

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30341

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-07-05
 CC||egallager at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #5 from Eric Gallager  ---
(In reply to Rob from comment #4)
> I have found that with very low system load that it _can_ occur using an
> XTerm window afterall - infrequently.
> 
> If your compiling for Cygwin it is best to make the mod to the Makefile.

...so... is that still the case with newer versions of GCC?

[Bug bootstrap/21561] bootstrap build fails on biarch targets while not on the native mode

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21561

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org

--- Comment #9 from Eric Gallager  ---
(In reply to Andrew Pinski from comment #8)
> > re-opened
> 
> suspended does not mean this bug is closed, in fact this bug is still opened
> and I think it was fixed on the trunk already.  It turns out this was really
> an automake/libtool bug.

Have any automake/libtool releases since then fixed this bug?

[Bug bootstrap/9968] Prefix ending in "/" causes trouble in prefix.c

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9968

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org

--- Comment #11 from Eric Gallager  ---
(In reply to Nathanael C. Nerode from comment #9)
> Resummarizing.

Are you still working on this?

[Bug bootstrap/31151] During 'make bootstrap': Syntax error at line 1 : `>' is not expected

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31151

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-07-05
 CC||egallager at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Eric Gallager  ---
Does this still happen with newer versions of gcc?

[Bug c/79412] [6/7/8/9 Regression] ICE in fold_convert_loc, at fold-const.c:2239

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79412

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org
   Severity|normal  |minor

--- Comment #4 from Eric Gallager  ---
"minor" severity per https://gcc.gnu.org/bugs/management.html

[Bug c++/71605] ICE on invalid C++ code (incorrect member access): in pop_binding, at cp/name-lookup.c:368

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71605

Eric Gallager  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 CC||egallager at gcc dot gnu.org
   Severity|normal  |minor

[Bug lto/59000] lto can't merge user-defined weak builtin functions

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59000

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org

--- Comment #7 from Eric Gallager  ---
(In reply to Richard Biener from comment #2)
> This works on trunk, but of course symtab merging is pre-empted here by
> tree merging I think.  The error can be reproduced on trunk with
> 
> t1.i
> 
>   __attribute__((weak)) float
>scalbnf(float z) { return z; }
> 
> t2.i
> 
>   __attribute__((weak)) float
>scalbnf(float x, int y) { return x*y; }
> 
> which would be kind of invalid, of course.

"kind of" invalid?

[Bug target/51797] Arm backend missed the mls related optimization

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51797

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org

--- Comment #1 from Eric Gallager  ---
Should sameerad remain the assignee for this?

[Bug c++/71283] Inconsistent location for C++ warning options in the manual

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71283

--- Comment #7 from Eric Gallager  ---
(In reply to Martin Sebor from comment #6)
> I'm trying to fix this for GCC 8.

GCC 8 has been released. Deferred for GCC 9 then?

[Bug bootstrap/54304] linking stage picks up system mpfr instead of in-tree version

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54304

Eric Gallager  changed:

   What|Removed |Added

   Keywords||build
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=12596,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=78251

--- Comment #17 from Eric Gallager  ---
(In reply to Tobias Schlüter from comment #8)
> Sorry, didn't mean to hit "Save Changes" yet.
> 
> In the past I had to configure with
>   ../configure --with-libiconv-prefix=/opt/local --enable-languages=fortran
> because otherwise the build breaks with iconv issues (also something you
> find all over google).  And now I see why you asked: this of course puts the
> system gmp etc in the search path ahead of the ones built in-tree.  Not a
> desirable state admittedly.

Possibly related to bug 12596 and/or bug 78251

[Bug tree-optimization/86400] [8/9 regression] set::set

2018-07-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86400

Martin Sebor  changed:

   What|Removed |Added

   Keywords||patch
  Component|c++ |tree-optimization

--- Comment #8 from Martin Sebor  ---
Patch: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00220.html

[Bug gcov-profile/86404] UNRESOLVED/UNSUPPORTED gcov test results due to Permission error mapping pages

2018-07-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86404

Martin Sebor  changed:

   What|Removed |Added

Summary|UNSUPPORTED gcov test   |UNRESOLVED/UNSUPPORTED gcov
   |results due to Permission   |test results due to
   |error mapping pages |Permission error mapping
   ||pages

--- Comment #2 from Martin Sebor  ---
My most recent test run shows a different set of UNRESOLVED results for the
tree-prof tests.  There are lots of "Permission error mapping pages" in the
log.  It seems like some sort of a transient system error, possibly due to the
high parallelization.

UNRESOLVED: gcc.dg/tree-prof/comp-goto-1.c scan-tree-dump-not optimized
"-2147483648"
UNRESOLVED: gcc.dg/tree-prof/comp-goto-1.c scan-tree-dump optimized " < 0"
UNRESOLVED: gcc.dg/tree-prof/comp-goto-1.c scan-tree-dump gimple "ABS_EXPR"
UNRESOLVED: gcc.dg/tree-prof/comp-goto-1.c scan-tree-dump-not optimized
"ABS_EXPR"
UNRESOLVED: gcc.dg/tree-prof/stringop-2.c scan-tree-dump-times cddce1
"\\(float\\)" 2
UNRESOLVED: gcc.dg/tree-prof/stringop-2.c scan-tree-dump-not cddce1 "\\(long
double\\)"
UNRESOLVED: gcc.dg/tree-prof/va-arg-pack-1.c scan-tree-dump-times optimized
"if" 2
UNRESOLVED: gcc.dg/tree-prof/wcoverage-mismatch.c scan-tree-dump dom2 "Marking
all outgoing edges of unreachable"
UNRESOLVED: gcc.dg/tree-prof/pr66295.c scan-tree-dump-times vrp1
"tree_code_length.42." 1
UNRESOLVED: gcc.dg/tree-prof/cold_partition_label.c scan-tree-dump-times vect
"vectorized 2 loops" 1

[Bug c++/86400] [8/9 regression] set::set

2018-07-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86400

Martin Sebor  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|NEW |ASSIGNED
 Blocks||83819
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org

--- Comment #7 from Martin Sebor  ---
Confirmed.  The strlen pass sees:

  static char root[1][2] = {"/"};
  ...
  _1 = __builtin_strlen ();


but the code in maybe_set_strlen_range() assumes the argument has the correct
type (i.e., char*, not char[][2]) and uses TYPE_DOMAIN to determine the upper
bound of the array which returns the bound of the outer array in this case. 
Using TYPE_SIZE instead avoids the problem:

Index: gcc/tree-ssa-strlen.c
===
--- gcc/tree-ssa-strlen.c   (revision 262418)
+++ gcc/tree-ssa-strlen.c   (working copy)
@@ -1156,22 +1156,17 @@ maybe_set_strlen_range (tree lhs, tree src, tree b
   if (src_is_array && !array_at_struct_end_p (src))
{
  tree type = TREE_TYPE (src);
- if (tree dom = TYPE_DOMAIN (type))
-   {
- tree maxval = TYPE_MAX_VALUE (dom);
- if (maxval)
-   max = wi::to_wide (maxval);
- else
-   max = wi::zero (min.get_precision ());
+ if (tree size = TYPE_SIZE_UNIT (type))
+   if (size && TREE_CODE (size) == INTEGER_CST)
+ max = wi::to_wide (size);

- /* For strlen() the upper bound above is equal to
-the longest string that can be stored in the array
-(i.e., it accounts for the terminating nul.  For
-strnlen() bump up the maximum by one since the array
-need not be nul-terminated.  */
- if (bound)
-   ++max;
-   }
+ /* For strlen() the upper bound above is equal to
+the longest string that can be stored in the array
+(i.e., it accounts for the terminating nul.  For
+strnlen() bump up the maximum by one since the array
+need not be nul-terminated.  */
+ if (!bound && max != 0)
+   --max;
}
   else
{


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83819
[Bug 83819] [meta-bug] missing strlen optimizations

[Bug fortran/82009] [F08] ICE with block construct

2018-07-04 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82009

Jerry DeLisle  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #9 from Jerry DeLisle  ---
(In reply to Dominique d'Humieres from comment #8)
> > Fixed on trunk. Closing
> 
> When compiling the original test, the ICE is gone but I get:
> 
> Undefined symbols for architecture x86_64:
>   "_idxs.3783", referenced from:
>   ___sparse_matrix_csx_benchmark_utils_MOD_sparse_matrix_csc_benchmark
> in ccP98FL2.o
>   "_idxs.3792", referenced from:
>   ___sparse_matrix_csx_benchmark_utils_MOD_sparse_matrix_csr_benchmark
> in ccP98FL2.o
> 
> This looks weird.

Agree, I added a main program to that test case and now I see similar, so
reopening.

[Bug c++/86400] [8/9 regression] set::set

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86400

Jonathan Wakely  changed:

   What|Removed |Added

 CC|jwakely.gcc at gmail dot com   |msebor at gcc dot 
gnu.org,
   ||redi at gcc dot gnu.org

--- Comment #6 from Jonathan Wakely  ---
Reduced further:

void
foo2 ()
{
  static char root[1][2] = {"/"};
  auto len = __builtin_strlen(*root);
  if (len != 1)
  __builtin_abort();
}

int
main ()
{
  foo2 ();
}


This started to fail with r255790

PR middle-end/83373 - False positive reported by -Wstringop-overflow
PR tree-optimization/78450 - strlen(s) return value can be assumed to be
less than the size of s 

gcc/ChangeLog:  

PR middle-end/83373 
PR tree-optimization/78450  
* tree-ssa-strlen.c (maybe_set_strlen_range): New function. 
(handle_builtin_strlen): Call it.   

gcc/testsuite/ChangeLog:

PR middle-end/83373 
PR tree-optimization/78450  
* gcc.dg/pr83373.c: New test.   
* gcc.dg/strlenopt-36.c: New test.  
* gcc.dg/strlenopt-37.c: New test.

[Bug c++/86400] [8/9 regression] set::set

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86400

--- Comment #5 from Jonathan Wakely  ---
#include 
void
foo2 ()
{
  static char root[1][2] = {"/"};
  auto len = __builtin_strlen(*root);
  assert(len == 1);
}

int
main ()
{
  foo2 ();
}


$ g++ set.cc -O1 -foptimize-strlen
$ ./a.out
a.out: set.cc:7: void foo2(): Assertion `len == 1' failed.
Aborted (core dumped)

[Bug c++/86400] [8/9 regression] set::set

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86400

--- Comment #4 from Jonathan Wakely  ---
# /home/jwakely/gcc/9/include/c++/9.0.0/bits/basic_string.h:236:  
_M_construct(__beg, __end, _Tag());
.loc 3 236 11 is_stmt 0
movl$_ZZ4foo2vE4root, %edx  #,
movq%rdx, %rsi  #,
movq%rsp, %rdi  #,
.LEHB0:
call   
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag
#


The output of -fdump-tree-optimized:


   [local count: 8687547398]:
  MEM[(struct  &)] ={v} {CLOBBER};
  MEM[(struct  &)] ={v} {CLOBBER};
  MEM[(struct  &) + 8] ={v} {CLOBBER};
  MEM[(struct _Rb_tree_header *) + 8B]._M_header._M_color = 0;
  MEM[(struct _Rb_tree_header *) + 8B]._M_header._M_parent = 0B;
  MEM[(struct _Rb_tree_header *) + 8B]._M_header._M_left = [(struct
_Rb_tree_header *) + 8B]._M_header;
  MEM[(struct _Rb_tree_header *) + 8B]._M_header._M_right = [(struct
_Rb_tree_header *) + 8B]._M_header;
  MEM[(struct _Rb_tree_header *) + 8B]._M_node_count = 0;
  MEM[(struct _Rb_tree_const_iterator *)&__position] = [(struct _Rb_tree
*)]._M_impl.D.30202._M_header;
  MEM[(struct  &)] ={v} {CLOBBER};
  MEM[(struct  &)] ={v} {CLOBBER};
  MEM[(struct _Alloc_hider *)]._M_p = _M_local_buf;
  iftmp.26_33 = 
  std::__cxx11::basic_string::_M_construct (, ,
iftmp.26_33, D.38135);

iftmp.26_33 is the __end argument, and is set to the same value as __beg.

[Bug c++/86400] [8/9 regression] set::set

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86400

--- Comment #3 from Jonathan Wakely  ---
The set constructs a std::string element from *root i.e. "/" with this
constructor:

514  basic_string(const _CharT* __s, const _Alloc& __a = _Alloc())
515  : _M_dataplus(_M_local_data(), __a)
516  { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); }

Which then calls _M_construct with the same pointer for __beg and __end:

std::__cxx11::basic_string, std::allocator
>::_M_construct (__end=0x6020a0  "/", __beg=0x6020a0
 "/", this=0x7fffd320) at
/home/jwakely/gcc/9/include/c++/9.0.0/bits/basic_string.h:516

This constructs an empty string object, and so of course the d.find("/") call
returns the end iterator.

The problem is that traits_type::length(__s) returns 0, which is consistent
with my earlier observation that -foptimize-strlen is required to reproduce the
failure.

[Bug c/86407] New: Ignore function attributes in function type declarations?

2018-07-04 Thread zfigura at codeweavers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86407

Bug ID: 86407
   Summary: Ignore function attributes in function type
declarations?
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zfigura at codeweavers dot com
  Target Milestone: ---

Wine adds several type attributes to all exposed API functions. A recent bug
related to gcc 8.1 [1] has led to the decision [2] to add the
__ms_hook_prologue__ attribute to all exposed API functions (previously done on
a case-by-case basis), by adding it to the preexisting WINAPI macro added to
all exposed API functions. However, __ms_hook_prologue__ is defined as a
function attribute and not a type attribut, due to architectural reasons I do
not fully understand [3], and so the syntax

typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID);

expanding to

typedef unsigned int (__attribute__((__stdcall__))
__attribute__((__force_align_arg_pointer__))
__attribute__((__ms_hook_prologue__)) *APPLICATION_RECOVERY_CALLBACK)(void *);

generates the warning

warning: ‘__ms_hook_prologue__’ attribute does not apply to types
[-Wattributes]

We would like to avoid this warning, and do not want to disable -Wattributes
entirely. It seems to me that this specific warning is not really helpful in
general, as one should be able to combine all attributes applicable to a
function declaration into one macro, and in our case to avoid the warning
without any changes to GCC we would need to add a new attribute to over 50,000
entry points.

[1] https://bugs.winehq.org/show_bug.cgi?id=45199
[2] https://www.winehq.org/pipermail/wine-devel/2018-July/128938.html
[3] https://gcc.gnu.org/ml/gcc-patches/2009-09/msg01635.html

[Bug fortran/82009] [F08] ICE with block construct

2018-07-04 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82009

--- Comment #8 from Dominique d'Humieres  ---
> Fixed on trunk. Closing

When compiling the original test, the ICE is gone but I get:

Undefined symbols for architecture x86_64:
  "_idxs.3783", referenced from:
  ___sparse_matrix_csx_benchmark_utils_MOD_sparse_matrix_csc_benchmark in
ccP98FL2.o
  "_idxs.3792", referenced from:
  ___sparse_matrix_csx_benchmark_utils_MOD_sparse_matrix_csr_benchmark in
ccP98FL2.o

This looks weird.

[Bug c++/86398] is_trivially_constructible always returns true even when is_constructible returns false

2018-07-04 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86398

Ville Voutilainen  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||ville.voutilainen at gmail dot 
com
 Resolution|--- |FIXED

--- Comment #8 from Ville Voutilainen  ---
Fixed.

[Bug c++/86398] is_trivially_constructible always returns true even when is_constructible returns false

2018-07-04 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86398

--- Comment #7 from ville at gcc dot gnu.org ---
Author: ville
Date: Wed Jul  4 20:56:12 2018
New Revision: 262424

URL: https://gcc.gnu.org/viewcvs?rev=262424=gcc=rev
Log:
Backport from mainline

2018-07-04  Ville Voutilainen  

gcc/cp/

PR c++/86398
* method.c (is_trivially_xible): Return false
if is_xible_helper returns a NULL_TREE.

testsuite/

PR c++/86398
* g++.dg/ext/is_trivially_constructible1.C: Add new tests.

Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/method.c
   
branches/gcc-8-branch/gcc/testsuite/g++.dg/ext/is_trivially_constructible1.C

[Bug c++/86400] [8/9 regression] set::set

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86400

--- Comment #2 from Jonathan Wakely  ---
It fails with -O1 -foptimize-strlen -fipa-sra -finline-small-functions

[Bug sanitizer/84250] Symbol collision when using both Address and Undefined Behavior sanitizers (-fsanitize=address,undefined)

2018-07-04 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84250

--- Comment #5 from chefmax at gcc dot gnu.org ---
Author: chefmax
Date: Wed Jul  4 19:49:06 2018
New Revision: 262421

URL: https://gcc.gnu.org/viewcvs?rev=262421=gcc=rev
Log:
gcc/

2018-07-04  Maxim Ostapenko  

PR sanitizer/84250
* config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
libasan.
* gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.

libsanitizer/

2018-07-04  Maxim Ostapenko  

PR sanitizer/84250
* Makefile.am: Reorder libs.
* Makefile.in: Regenerate.
* asan/Makefile.am: Define DCAN_SANITIZE_UB=1, add dependancy from
libsanitizer_ubsan.la.
* asan/Makefile.in: Regenerate.
* ubsan/Makefile.am: Define new libsanitizer_ubsan.la library.
* ubsan/Makefile.in: Regenerate.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/gnu-user.h
trunk/gcc/gcc.c
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/Makefile.am
trunk/libsanitizer/Makefile.in
trunk/libsanitizer/asan/Makefile.am
trunk/libsanitizer/asan/Makefile.in
trunk/libsanitizer/ubsan/Makefile.am
trunk/libsanitizer/ubsan/Makefile.in

[Bug c++/86403] Deduction guides not supported in local classes

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86403

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2018-07-04
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Please read https://gcc.gnu.org/bugs/

[Bug c++/86398] is_trivially_constructible always returns true even when is_constructible returns false

2018-07-04 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86398

--- Comment #6 from ville at gcc dot gnu.org ---
Author: ville
Date: Wed Jul  4 19:21:38 2018
New Revision: 262420

URL: https://gcc.gnu.org/viewcvs?rev=262420=gcc=rev
Log:
PR c++/86398

gcc/cp/

PR c++/86398
* method.c (is_trivially_xible): Return false
if is_xible_helper returns a NULL_TREE.

testsuite/

PR c++/86398
* g++.dg/ext/is_trivially_constructible1.C: Add new tests.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/method.c
trunk/gcc/testsuite/g++.dg/ext/is_trivially_constructible1.C

[Bug tree-optimization/86274] [7/8 Regression] SEGFAULT when logging std::to_string(NAN)

2018-07-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86274

--- Comment #17 from Martin Sebor  ---
Author: msebor
Date: Wed Jul  4 18:58:51 2018
New Revision: 262419

URL: https://gcc.gnu.org/viewcvs?rev=262419=gcc=rev
Log:
gcc/testsuite/ChangeLog:

PR tree-optimization/86274
* gcc.dg/tree-ssa/builtin-sprintf-9.c: Fix typo.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-9.c

[Bug target/86383] [9 Regression] arm-netbsdelf cross compiler fails in selftests

2018-07-04 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86383

--- Comment #2 from Richard Earnshaw  ---
I'm not sure how relevant the netbsd-elf port is these days.  I believe they've
now moved onto an EABI based ABI.  But no GCC port of that has been
contributed.

[Bug debug/86406] New: [8/9 Regression][UBSAN] -fcompare-debug failure with -fsanitize=undefined

2018-07-04 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86406

Bug ID: 86406
   Summary: [8/9 Regression][UBSAN] -fcompare-debug failure with
-fsanitize=undefined
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Created attachment 44352
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44352=edit
Test case, compile with: g++ -S -fcompare-debug -fsanitize=undefined -g -O1
input.ii

Using today's trunk build and today's GCC 8 branch build:

~/gcc/gcc-8/bin/g++ -S -fcompare-debug -fsanitize=undefined -g -O1 input15b.ii
g++: error: input15b.ii: -fcompare-debug failure

[Bug fortran/82009] [F08] ICE with block construct

2018-07-04 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82009

Jerry DeLisle  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jerry DeLisle  ---
Fixed on trunk. Closing

[Bug gcov-profile/86404] UNSUPPORTED gcov test results due to Permission error mapping pages

2018-07-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86404

--- Comment #1 from Martin Sebor  ---
Another such result but for a C++ test is:

UNRESOLVED: g++.dg/bprob/g++-bprob-2.C scan-assembler .ascii bar
g++.dg/bprob/g++-bprob-2.C: output file does not exist
UNRESOLVED: g++.dg/bprob/g++-bprob-2.C scan-assembler .ascii foo

The g++.dg/bprob/g++-bprob-1.C test shows a different result:

UNSUPPORTED: g++.dg/bprob/g++-bprob-1.C -fauto-profile: cannot run create_gcov

[Bug libstdc++/86272] [6/7/8/9 Regression] __gnu_debug::string uses undefined __glibcxx_check_insert_range2

2018-07-04 Thread fdumont at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86272

--- Comment #5 from François Dumont  ---
Author: fdumont
Date: Wed Jul  4 18:13:11 2018
New Revision: 262417

URL: https://gcc.gnu.org/viewcvs?rev=262417=gcc=rev
Log:
2018-07-04  François Dumont  

PR libstdc++/86272
* include/debug/string
(__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite,
_Ite)):
Use __glibcxx_check_insert_range.
* 21_strings/basic_string/cons/char/1.cc: Adapt test to use
__gnu_debug::string when _GLIBCXX_DEBUG.
* 21_strings/basic_string/init-list.cc: Likewise.
* 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
* 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
* 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
* 21_strings/basic_string/types/1.cc: Likewise.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/debug/string
trunk/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/1.cc
trunk/libstdc++-v3/testsuite/21_strings/basic_string/init-list.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/1.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/2.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc
trunk/libstdc++-v3/testsuite/21_strings/basic_string/types/1.cc

[Bug testsuite/86405] New: UNRESOLVED bb-slp-over-widen-1.c and -2.c

2018-07-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86405

Bug ID: 86405
   Summary: UNRESOLVED bb-slp-over-widen-1.c and -2.c
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

I see the unexpected UNRESOLVED results for the
gcc.dg/vect/bb-slp-over-widen-1.c and -2.c tests in my builds on x86_64-linux
builds running Fedora 25.  The results reported on gcc-testresults for the same
target (but possibly different OS) don't show these tests as UNRESOLVED.

PASS: gcc.dg/vect/bb-slp-over-widen-1.c execution test
PASS: gcc.dg/vect/bb-slp-over-widen-1.c scan-tree-dump slp2 "demoting int to
signed short"
PASS: gcc.dg/vect/bb-slp-over-widen-1.c scan-tree-dump slp2 "demoting int to
unsigned short"
gcc.dg/vect/bb-slp-over-widen-1.c: dump file does not exist
UNRESOLVED: gcc.dg/vect/bb-slp-over-widen-1.c scan-tree-dump-times vect "basic
block vectorized" 2

[Bug fortran/82009] [F08] ICE with block construct

2018-07-04 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82009

--- Comment #6 from Jerry DeLisle  ---
Author: jvdelisle
Date: Wed Jul  4 18:08:16 2018
New Revision: 262416

URL: https://gcc.gnu.org/viewcvs?rev=262416=gcc=rev
Log:
2018-07-04  Jerry DeLisle  

PR fortran/82009
* trans-decl.c (gfc_process_block_locals): Delete assert and set
saved_local_decls = NULL_TREE.

* gfortran.dg/block_16.f08. New test.

Added:
trunk/gcc/testsuite/gfortran.dg/block_16.f08
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-decl.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/66679] [OOP] ICE with class(*) and transfer

2018-07-04 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66679

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org

--- Comment #3 from Paul Thomas  ---
I have a fix for this, which is regtesting as I write.

Paul

[Bug gcov-profile/86404] New: UNSUPPORTED gcov test results due to Permission error mapping pages

2018-07-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86404

Bug ID: 86404
   Summary: UNSUPPORTED gcov test results due to Permission error
mapping pages
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

I've been noticing a number of unexpected UNRESOLVED results in my heavily
parallel builds (make -j96) on x86_64-linux running Fedora 25 that don't appear
in results reported on gcc-testresults:

UNRESOLVED: gcc.dg/tree-prof/20050826-2.c scan-tree-dump-times pre "Eliminated:
1" 1
UNRESOLVED: gcc.dg/tree-prof/pr66295.c scan-tree-dump-times optimized " \\* " 6
UNRESOLVED: gcc.dg/tree-prof/wcoverage-mismatch.c scan-tree-dump-times vrp1
"Folding predicate" 1
UNRESOLVED: gcc.dg/tree-prof/pr34999.c scan-tree-dump-not optimized "return 1;"
UNRESOLVED: gcc.dg/tree-prof/val-prof-1.c scan-tree-dump-not fre1 "= [dbc];"
UNRESOLVED: gcc.dg/tree-prof/switch-case-2.c scan-tree-dump-times vect
"consider run-time aliasing" 1
UNRESOLVED: gcc.dg/tree-prof/switch-case-2.c scan-tree-dump-times vect
"improved number of alias checks from 1 to 0" 1
UNRESOLVED: gcc.dg/tree-prof/switch-case-2.c scan-tree-dump-times vect "LOOP
VECTORIZED" 1

The relevant portion of the build log around some of the failures is below:

spawn create_gcov --binary
/opt/notnfs/msebor/build/gcc-86274/gcc/testsuite/gcc1/20050826-2.x01
--profile=/opt/notnfs/msebor/build/gcc-86274/gcc/testsuite/gcc1/20050826-2.perf.data
-gcov_version=1
--gcov=/opt/notnfs/msebor/build/gcc-86274/gcc/testsuite/gcc1/afdo.20050826-2.gcda
spawn of create_gcov --binary
/opt/notnfs/msebor/build/gcc-86274/gcc/testsuite/gcc1/20050826-2.x01
--profile=/opt/notnfs/msebor/build/gcc-86274/gcc/testsuite/gcc1/20050826-2.perf.data
-gcov_version=1
--gcov=/opt/notnfs/msebor/build/gcc-86274/gcc/testsuite/gcc1/afdo.20050826-2.gcda
failed
UNSUPPORTED: gcc.dg/tree-prof/20050826-2.c -fauto-profile: cannot run
create_gcov
Executing on host:
/opt/notnfs/msebor/src/gcc/86274/gcc/testsuite/../config/i386/gcc-auto-profile
true -v >/dev/null   (timeout = 300)
spawn -ignore SIGHUP
/opt/notnfs/msebor/src/gcc/86274/gcc/testsuite/../config/i386/gcc-auto-profile
true -v >/dev/null
Permission error mapping pages.
Consider increasing /proc/sys/kernel/perf_event_mlock_kb,
or try again with a smaller value of -m/--mmap_pages.
(current value: 4294967295,0)
UNSUPPORTED: gcc.dg/tree-prof/bb-reorg.c -fauto-profile
Executing on host:
/opt/notnfs/msebor/src/gcc/86274/gcc/testsuite/../config/i386/gcc-auto-profile
true -v >/dev/null   (timeout = 300)
spawn -ignore SIGHUP
/opt/notnfs/msebor/src/gcc/86274/gcc/testsuite/../config/i386/gcc-auto-profile
true -v >/dev/null
Permission error mapping pages.
Consider increasing /proc/sys/kernel/perf_event_mlock_kb,
or try again with a smaller value of -m/--mmap_pages.
(current value: 4294967295,0)
UNSUPPORTED: gcc.dg/tree-prof/cmpsf-1.c -fauto-profile
Executing on host:
/opt/notnfs/msebor/src/gcc/86274/gcc/testsuite/../config/i386/gcc-auto-profile
true -v >/dev/null   (timeout = 300)
spawn -ignore SIGHUP
/opt/notnfs/msebor/src/gcc/86274/gcc/testsuite/../config/i386/gcc-auto-profile
true -v >/dev/null
Permission error mapping pages.
Consider increasing /proc/sys/kernel/perf_event_mlock_kb,
or try again with a smaller value of -m/--mmap_pages.
(current value: 4294967295,0)

[Bug lto/86004] [9 regression] Several lto test cases begin failing with r260963

2018-07-04 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86004

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #7 from Martin Sebor  ---
I also see these failures in my builds on x86_64-linux running Fedora 25 with
stock Binutils (GNU ld version 2.26.1-1.fc25
).  The ld warning is the same:

  /usr/bin/ld: /tmp/ccIHhHfL.lto.o: plugin needed to handle lto object

>From comment #6 it sounds like there are at least two options for how to deal
with these failures.  Is there consensus on how to proceed?  (I build on a
shared machine where I'm not sure I will be able to upgrade Binutils so I would
prefer some other alternative).

$ grep ^FAIL gcc/testsuite/g++/g++.log | grep lto
FAIL: g++.dg/lto/20091002-1 cp_lto_20091002-1_0.o-cp_lto_20091002-1_0.o link,
-fPIC -flto -Wno-return-type
FAIL: g++.dg/lto/pr64043 cp_lto_pr64043_0.o-cp_lto_pr64043_0.o link,  -flto
-std=c++11 
FAIL: g++.dg/lto/pr65193 cp_lto_pr65193_0.o-cp_lto_pr65193_0.o link, -fPIC -r
-nostdlib -flto -O2 -g -Wno-return-type
FAIL: g++.dg/lto/pr65302 cp_lto_pr65302_0.o-cp_lto_pr65302_1.o link,  -flto -O2
-Wno-return-type 
FAIL: g++.dg/lto/pr65316 cp_lto_pr65316_0.o-cp_lto_pr65316_1.o link,  -flto
-std=c++11 -g2 -fno-lto-odr-type-merging -O2 -Wno-return-type 
FAIL: g++.dg/lto/pr65549 cp_lto_pr65549_0.o-cp_lto_pr65549_0.o link, 
-std=gnu++14 -flto -g -Wno-return-type 
FAIL: g++.dg/lto/pr65549 cp_lto_pr65549_0.o-cp_lto_pr65549_0.o link, 
-std=gnu++14 -flto -g -O2 -fno-inline -flto-partition=max -Wno-return-type 
FAIL: g++.dg/lto/pr66180 cp_lto_pr66180_0.o-cp_lto_pr66180_1.o link,  -flto
-std=c++14 -r -nostdlib 
FAIL: g++.dg/lto/pr66705 cp_lto_pr66705_0.o-cp_lto_pr66705_0.o link,  -O2 -flto
-flto-partition=max -fipa-pta 
FAIL: g++.dg/lto/pr68057 cp_lto_pr68057_0.o-cp_lto_pr68057_1.o link, -O0 -flto
-flto-partition=none -fuse-linker-plugin
FAIL: g++.dg/lto/pr68057 cp_lto_pr68057_0.o-cp_lto_pr68057_1.o link, -O2 -flto
-flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects 
FAIL: g++.dg/lto/pr68057 cp_lto_pr68057_0.o-cp_lto_pr68057_1.o link, -O0 -flto
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: g++.dg/lto/pr68057 cp_lto_pr68057_0.o-cp_lto_pr68057_1.o link, -O2 -flto
-fuse-linker-plugin
FAIL: g++.dg/lto/pr69077 cp_lto_pr69077_0.o-cp_lto_pr69077_1.o link,  -O3 -g
-flto 
FAIL: g++.dg/lto/pr69133 cp_lto_pr69133_0.o-cp_lto_pr69133_1.o link,  -flto -O2 
FAIL: g++.dg/lto/pr69137 cp_lto_pr69137_0.o-cp_lto_pr69137_0.o link, 
-std=c++11 -g -flto 
FAIL: g++.dg/lto/pr79000 cp_lto_pr79000_0.o-cp_lto_pr79000_1.o link, -flto -g
FAIL: g++.dg/lto/pr81940 cp_lto_pr81940_0.o-cp_lto_pr81940_0.o link,  -O -flto 
FAIL: g++.dg/lto/pr85176 cp_lto_pr85176_0.o-cp_lto_pr85176_0.o link,  -flto -g1

[Bug c++/86403] New: Deduction guides not supported in local classes

2018-07-04 Thread jeanmichael.celerier at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86403

Bug ID: 86403
   Summary: Deduction guides not supported in local classes
   Product: gcc
   Version: 8.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jeanmichael.celerier at gmail dot com
  Target Milestone: ---

See for instance : 

https://godbolt.org/g/6DKxPx

[Bug tree-optimization/86214] [8/9 Regression] Strongly increased stack usage

2018-07-04 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86214

Alexander Monakov  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #8 from Alexander Monakov  ---
Removing the 'waiting' status.

[Bug c/69558] [6/7/8/9 Regression] glib2 warning pragmas stopped working

2018-07-04 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69558

Bernd Edlinger  changed:

   What|Removed |Added

 CC||bernd.edlinger at hotmail dot 
de

--- Comment #24 from Bernd Edlinger  ---
(In reply to Jakub Jelinek from comment #4)
> Reverting one minor part of those changes fixes both of the PRs though:
> --- gcc/c-family/c-pragma.c.jj2016-01-15 21:57:00.0 +0100
> +++ gcc/c-family/c-pragma.c   2016-01-29 18:34:51.743943283 +0100
> @@ -819,7 +819,7 @@ handle_pragma_diagnostic(cpp_reader *ARG
>  arg = option_string + 1 + cl_options[option_index].opt_len;
>control_warning_option (option_index, (int) kind,
> arg, kind != DK_IGNORED,
> -   loc, lang_mask, ,
> +   input_location, lang_mask, ,
> _options, _options_set,
> global_dc);
>  }
> I have no idea why, but if it doesn't break anything else, I think it would
> be better to revert it.  The ChangeLog nor gcc-patches post doesn't mention
> that change anywhere.

FYI, I was there as well, and found the following.
loc points to the location of ")" in "C (foo)",
while input_location points to "C" in the C FE and to ")" in the C++ FE :-)

The reason why this does still not work in C++ is, that
the source code is sorted by location in this way:
"void foo (void) _Pragma ("GCC diagnostic push")
 Pragma ("GCC diagnostic ignored")"

at the time when the warning is issued.
while your patch fixed the C FE, by using the location of the macro expansion
pint for the _Pragma,
and therefore the stack looked again way:
"_Pragma ("push") _Pragma ("ignored") void foo (void)"
This works only because the warning is printed immediately.
For late warnings the situation would look like
"_Pragma ("push") _Pragma ("ignored") _Pragma ("pop") warning_location"

[Bug lto/86344] GCC 8.1 ICEd at LTO stage

2018-07-04 Thread oddin at mimecast dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86344

--- Comment #4 from Oliver Ddin  ---
So, I grabbed GCC8.1.1 from trunk and built it. Crash reoccured.

However, I noticed that GCC wasn't doing LTO through the linker plugin, so
after rebuilding with the correct configuration to enable -fuse-linker-plugin
to work, I then rebuilt the project and this time, LTO succeeded without error.

So, I suspect this is specifically a bug that manifests when doing LTO without
using the linker plugin. I unfortunately don't have anything better for you at
this point and since I now have a working build, I'll probably not get the time
to find a minimal case that reproduces this in the non-linker-plugin scenario.

[Bug tree-optimization/86214] [8/9 Regression] Strongly increased stack usage

2018-07-04 Thread steinar+gcc at gunderson dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86214

--- Comment #7 from Steinar H. Gunderson  ---
Created attachment 44351
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44351=edit
Unreduced test case

There; unreduced, from public MySQL. This is preprocessed with GCC 7, and
compiles both with 7 and 8 (the latter triggers too big stack).

[Bug libstdc++/86402] New: Several targets missing AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1) in crossconfig.m4

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86402

Bug ID: 86402
   Summary: Several targets missing
AC_DEFINE(_GLIBCXX_USE_RANDOM_TR1) in crossconfig.m4
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

All the BSDs (including Darwin) support /dev/random and /dev/urandom and maybe
HPUX too. They should define the config macro.

[Bug lto/70955] [6 Regression] Wrong code generation for __builtin_ms_va_list with -flto

2018-07-04 Thread zenith432 at users dot sourceforge.net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70955

zenith432 at users dot sourceforge.net changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #29 from zenith432 at users dot sourceforge.net ---
verified as working long ago.

[Bug lto/86175] LTO code generator does not respect ld -u option to force symbol inclusion in the link product

2018-07-04 Thread zenith432 at users dot sourceforge.net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86175

zenith432 at users dot sourceforge.net changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED
 Resolution|MOVED   |FIXED

--- Comment #6 from zenith432 at users dot sourceforge.net ---
This bug is fixed in binutils master.

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=94d401b8b88a76b1372ce44e805516756a4f737b

[Bug tree-optimization/86214] [8/9 Regression] Strongly increased stack usage

2018-07-04 Thread steinar+gcc at gunderson dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86214

--- Comment #6 from Steinar H. Gunderson  ---
I wouldn't be surprised if everything is really over-reduced, and that GCC 7
just happens not to hit this by luck.

I'll be making a checkout of the public git repository and try to reproduce
there, so that I can give you an unreduced version.

[Bug target/85904] [7/8 Regression] configure issue cross compiling on netbsd, with patch

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85904

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #7 from Jonathan Wakely  ---
Fixed for 7.4 and 8.2

[Bug libstdc++/85098] undefined reference to std::regex::extended

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85098

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.4

--- Comment #9 from Jonathan Wakely  ---
Fixed for 7.4 and 8.2

[Bug libstdc++/85671] Lack of `std::move()` inside `operator/` for `std::filesystem::path`.

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85671

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|8.2 |7.4

--- Comment #8 from Jonathan Wakely  ---
And 7.4

[Bug libstdc++/83982] [6 Regression] Exception guarantee of C++14 vector::resize(size_type) is not met

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83982

Jonathan Wakely  changed:

   What|Removed |Added

Summary|[6/7/8/9 Regression]|[6 Regression] Exception
   |Exception guarantee of  |guarantee of C++14
   |C++14   |vector::resize(size_type)
   |vector::resize(size_type)   |is not met
   |is not met  |

--- Comment #10 from Jonathan Wakely  ---
The regression is fixed everywhere except the gcc-6-branch now.

[Bug libstdc++/84087] string::assign problem with two arguments

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84087

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|8.2 |7.4

--- Comment #11 from Jonathan Wakely  ---
And 7.4

[Bug libstdc++/86127] STL containers do not satisfy container.requirements.general clause 8

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86127

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|9.0 |7.4

--- Comment #13 from Jonathan Wakely  ---
(In reply to Jonathan Wakely from comment #6)
> I've removed the converting copies from forward_list.

For 7.4 and 8.2 as well as trunk.

[Bug gcov-profile/45582] gcda file names collision when profiling

2018-07-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45582

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #3 from Martin Liška  ---
Fixed on trunk in r262251.

[Bug middle-end/66240] RFE: extend -falign-xyz syntax

2018-07-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66240

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Martin Liška  ---
Implemented in trunk now.

[Bug tree-optimization/86214] [8/9 Regression] Strongly increased stack usage

2018-07-04 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86214

--- Comment #5 from Alexander Monakov  ---
Sorry, this still seems over-reduced: the 'cmp' variable is uninitialized, and
gcc-7 completely optimizes out the block with large stack usage guarded by 'cmp
== 0' test, so gcc-7 vs gcc-8 is not directly comparable. It's strange that
gcc-7 optimizes that out, but it's a different issue.

Can you attach the unreduced preprocessed source, and if you make another
attempt at reducing, perhaps enable most warnings?

That said, it seems gcc is not very good at re-discovering non-overlapping
stack allocations introduced by inlining. Looking at your testcase I came up
with the following minimal test:

struct S{~S();};

void f(void *);

inline void ff()
{
  char c[1000];
  f(c);
}

void g(int n)
{
  S s;
  char c[100];
  f(c);
  if (n) ff(), ff();
}

(there's no regression vs. gcc-7 on this example, but gcc-4.6 used to get a
better result by consuming 1100 bytes rather than 2100).

[Bug libstdc++/86127] STL containers do not satisfy container.requirements.general clause 8

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86127

--- Comment #12 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 13:59:42 2018
New Revision: 262411

URL: https://gcc.gnu.org/viewcvs?rev=262411=gcc=rev
Log:
PR libstdc++/86127 avoid unnecessary allocator conversions

There is no need to use an allocator of the correct value_type when
calling allocator_traits::construct and allocator_traits::destroy. The
existing node allocator can be used, instead of constructing a new
allocator object every time.

There's also no benefit to using __gnu_cxx::__alloc_traits instead of
std::allocator_traits to get the pointer and const_pointer types.
std::forward_list is only available for C++11 and later, when
std::allocator_traits is available too.

Backport from mainline
2018-06-13  Jonathan Wakely  

PR libstdc++/86127
* include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
unused typedef.
(_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
Use node allocator to create and destroy elements.
(forward_list::_Tp_alloc_type): Remove unused typedef.
(forward_list::_Alloc_traits): Use allocator_traits instead of
__gnu_cxx::__alloc_traits.
* include/bits/forward_list.tcc (_Fwd_list_base::_M_erase_after):
Use node allocator to create and destroy elements.

Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/bits/forward_list.h
branches/gcc-7-branch/libstdc++-v3/include/bits/forward_list.tcc

[Bug other/31852] Missing __builtin_memchr

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31852

--- Comment #9 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 13:59:28 2018
New Revision: 262408

URL: https://gcc.gnu.org/viewcvs?rev=262408=gcc=rev
Log:
Add another workaround to std::variant for Clang bug 31852

Backport from mainline
2018-04-05  Jonathan Wakely  

* include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
__get calls to avoid ADL and avoid ambiguity due to Clang bug.

Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/std/variant

[Bug other/31852] Missing __builtin_memchr

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31852

--- Comment #8 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 13:59:21 2018
New Revision: 262407

URL: https://gcc.gnu.org/viewcvs?rev=262407=gcc=rev
Log:
Add workaround to std::variant for Clang bug 31852

Backport from mainline
2018-03-26  Jonathan Wakely  

* include/std/variant (__get): Qualify calls to avoid ADL.
(__select_index): Adjust whitespace.
(variant): Add using-declaration to workaround Clang bug.

Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/std/variant

[Bug target/85904] [7/8 Regression] configure issue cross compiling on netbsd, with patch

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85904

--- Comment #6 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 13:59:17 2018
New Revision: 262406

URL: https://gcc.gnu.org/viewcvs?rev=262406=gcc=rev
Log:
PR target/85904 check for aligned_alloc on netbsd cross-compilation

Backport from mainline
2018-05-24  Maya Rashish  

PR target/85904
* crossconfig.m4: Test for aligned_alloc on netbsd.
* configure: Regenerate.

Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/configure
branches/gcc-7-branch/libstdc++-v3/crossconfig.m4

[Bug libstdc++/85098] undefined reference to std::regex::extended

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85098

--- Comment #8 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 13:59:13 2018
New Revision: 262405

URL: https://gcc.gnu.org/viewcvs?rev=262405=gcc=rev
Log:
PR libstdc++/85098 add missing definitions for static constants

In C++11 and C++14 any odr-use of these constants requires a definition
at namespace-scope.  In C++17 they are implicitly inline and so the
namespace-scope redeclarations are redundant (and allowing them is
deprecated).

Backport from mainline
2018-05-18  Jonathan Wakely  

PR libstdc++/85098
* include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
(basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
(basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
(basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
definitions.
* include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
whitespace.
* testsuite/28_regex/basic_regex/85098.cc: New

Added:
branches/gcc-7-branch/libstdc++-v3/testsuite/28_regex/basic_regex/85098.cc
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/bits/regex.h
branches/gcc-7-branch/libstdc++-v3/include/bits/regex_automaton.h

[Bug libstdc++/84087] string::assign problem with two arguments

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84087

--- Comment #10 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 13:58:50 2018
New Revision: 262402

URL: https://gcc.gnu.org/viewcvs?rev=262402=gcc=rev
Log:
PR libstdc++/84087 add default arguments to basic_string members (LWG 2268)

This change was a DR against C++11 and so should have been implemented
years ago.

Backport from mainline
2018-05-03  Jonathan Wakely  

PR libstdc++/84087 LWG DR 2268 basic_string default arguments
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
(append(const basic_string&, size_type, size_type)
(assign(const basic_string&, size_type, size_type)
(insert(size_type, const basic_string&, size_type, size_type)
(replace(size_type,size_type,const basic_string&,size_type,size_type)
(compare(size_type,size_type,constbasic_string&,size_type,size_type)):
Add default arguments (LWG 2268).
[_GLIBCXX_USE_CXX11_ABI=0]
(append(const basic_string&, size_type, size_type)
(assign(const basic_string&, size_type, size_type)
(insert(size_type, const basic_string&, size_type, size_type)
(replace(size_type,size_type,const basic_string&,size_type,size_type)
(compare(size_type,size_type,constbasic_string&,size_type,size_type)):
Likewise.
* testsuite/21_strings/basic_string/dr2268.cc: New test.

Added:
   
branches/gcc-7-branch/libstdc++-v3/testsuite/21_strings/basic_string/dr2268.cc
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/bits/basic_string.h

[Bug libstdc++/83982] [6/7/8/9 Regression] Exception guarantee of C++14 vector::resize(size_type) is not met

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83982

--- Comment #9 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 13:59:01 2018
New Revision: 262403

URL: https://gcc.gnu.org/viewcvs?rev=262403=gcc=rev
Log:
PR libstdc++/83982 fix exception-safety guarantee of std::vector::resize

Construct new elements before moving existing ones, so that if a default
constructor throws, the existing elements are not left in a moved-from
state.

Backport from mainline
2018-06-14  Daniel Trebbien 
Jonathan Wakely  

PR libstdc++/83982
* include/bits/vector.tcc (vector::_M_default_append(size_type)):
Default-construct new elements before moving existing ones.
* testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
New.

Added:
   
branches/gcc-7-branch/libstdc++-v3/testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/bits/vector.tcc

[Bug libstdc++/85671] Lack of `std::move()` inside `operator/` for `std::filesystem::path`.

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85671

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 13:59:06 2018
New Revision: 262404

URL: https://gcc.gnu.org/viewcvs?rev=262404=gcc=rev
Log:
PR libstdc++/85671 allow copy elision in path concatenation

By performing the /= operation on a named local variable instead of a
temporary the copy made for the return value can be elided.

Backport from mainline
2018-05-07  Jonathan Wakely  

PR libstdc++/85671
* include/experimental/bits/fs_path.h (operator/): Likewise.

Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/experimental/bits/fs_path.h

[Bug target/81652] [meta-bug] -fcf-protection=full bugs

2018-07-04 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81652
Bug 81652 depends on bug 85620, which changed state.

Bug 85620 Summary: Missing ENDBR after swapcontext
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85620

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

[Bug middle-end/85620] Missing ENDBR after swapcontext

2018-07-04 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85620

H.J. Lu  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.0

--- Comment #9 from H.J. Lu  ---
Fixed for GCC 9.

[Bug bootstrap/78251] config/gettext.m4 and config/iconv.m4 contaminate CPPFLAGS

2018-07-04 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78251

--- Comment #6 from Andreas Schwab  ---
If configure tests are nested then that's a bug in the way the tests are
written.

[Bug gcov-profile/83878] Line hit counts are sometimes wrong

2018-07-04 Thread mcastelluccio at mozilla dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83878

Marco Castelluccio  changed:

   What|Removed |Added

 Status|RESOLVED|VERIFIED

--- Comment #4 from Marco Castelluccio  ---
Thanks! I've verified that the test case is fixed now!

[Bug c++/60335] confused by earlier errors, bailing out

2018-07-04 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60335

Eric Gallager  changed:

   What|Removed |Added

   Keywords|needs-bisection |
   Last reconfirmed|2015-02-10 00:00:00 |2018-7-4

--- Comment #5 from Eric Gallager  ---
(In reply to Paolo Carlini from comment #4)
> You want the C++ front-end. Not actively working on it anyway.

Oh ok, reconfirmed then.

[Bug bootstrap/78251] config/gettext.m4 and config/iconv.m4 contaminate CPPFLAGS

2018-07-04 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78251

--- Comment #5 from Iain Sandoe  ---
is this a GCC bug, or really a gettext /iconv one?
(the comments at the top of the file suggest that these two m4 modules have
been imported)

A quick scan of the code suggests that the writers intended the CPPFLAGS to be
saved.  However, variable names like "am_save_CPPFLAGS" can overwrite
previously saved values in the case of nested configuration tests; it's a very
common choice of save name and I have seen this in GCC config problems before.

If you change the am_save_CPPFLAGS in the iconv m4 to am_iconv_save_CPPFLAGS
(and regenerate all configures that include it) does that resolve the issue? 

 It looks like the gettext save value is already  intended to be specific
(gt_save_CPPFLAGS)

[Bug middle-end/86380] incorrect comparison in function choose_multiplier

2018-07-04 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86380

Eric Botcazou  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.0

--- Comment #6 from Eric Botcazou  ---
Thanks for reporting the problem.

[Bug middle-end/86380] incorrect comparison in function choose_multiplier

2018-07-04 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86380

--- Comment #5 from Eric Botcazou  ---
Author: ebotcazou
Date: Wed Jul  4 12:56:48 2018
New Revision: 262401

URL: https://gcc.gnu.org/viewcvs?rev=262401=gcc=rev
Log:
PR middle-end/86380
* expmed.c (choose_multiplier): Fix incorrect comparison with mask.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/expmed.c

[Bug target/34777] uClibc-0.9.29 compilation error for sh4 arch with gcc-4.x

2018-07-04 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34777

--- Comment #14 from Oleg Endo  ---
(In reply to Eric Gallager from comment #13)
> > 
> > I've tried that test case with the sh-lra branch and the problems seem to be
> > gone.
> 
> So is this FIXED yet then?

LRA is not enabled by default on SH, so I'd say no, not fixed yet.  Please
leave open.

[Bug bootstrap/86371] building compiler tries to look in $HOME/local/include

2018-07-04 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86371

Martin Jambor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Martin Jambor  ---
Fixed with

https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00198.html

[Bug bootstrap/86371] building compiler tries to look in $HOME/local/include

2018-07-04 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86371

--- Comment #4 from Martin Jambor  ---
Author: jamborm
Date: Wed Jul  4 12:22:29 2018
New Revision: 262400

URL: https://gcc.gnu.org/viewcvs?rev=262400=gcc=rev
Log:
Remove spurious $HOME include from BRIG FE Makefile

2018-07-04  Martin Jambor  

PR hsa/86371
* Make-lang.in (BRIGINCLUDES): Remove erroneous include path in $HOME.



Modified:
branches/gcc-7-branch/gcc/brig/ChangeLog
branches/gcc-7-branch/gcc/brig/Make-lang.in

[Bug bootstrap/86371] building compiler tries to look in $HOME/local/include

2018-07-04 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86371

--- Comment #3 from Martin Jambor  ---
Author: jamborm
Date: Wed Jul  4 12:20:26 2018
New Revision: 262399

URL: https://gcc.gnu.org/viewcvs?rev=262399=gcc=rev
Log:
Remove spurious $HOME include from BRIG FE Makefile

2018-07-04  Martin Jambor  

PR hsa/86371
* Make-lang.in (BRIGINCLUDES): Remove erroneous include path in $HOME.



Modified:
branches/gcc-8-branch/gcc/brig/ChangeLog
branches/gcc-8-branch/gcc/brig/Make-lang.in

[Bug bootstrap/86371] building compiler tries to look in $HOME/local/include

2018-07-04 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86371

--- Comment #2 from Martin Jambor  ---
Author: jamborm
Date: Wed Jul  4 12:08:16 2018
New Revision: 262398

URL: https://gcc.gnu.org/viewcvs?rev=262398=gcc=rev
Log:
Remove spurious $HOME include from BRIG FE Makefile

2018-07-04  Martin Jambor  

PR hsa/86371
* Make-lang.in (BRIGINCLUDES): Remove erroneous include path in $HOME.



Modified:
trunk/gcc/brig/ChangeLog
trunk/gcc/brig/Make-lang.in

[Bug tree-optimization/86401] The "For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,..." opts are only in fold-const.c and in RTL

2018-07-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86401

--- Comment #1 from Jakub Jelinek  ---
Created attachment 44350
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44350=edit
gcc9-pr86401.patch

Untested fix.

[Bug tree-optimization/86214] [8/9 Regression] Strongly increased stack usage

2018-07-04 Thread steinar+gcc at gunderson dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86214

--- Comment #4 from Steinar H. Gunderson  ---
New test case added. It's quite a bit larger than the old one, but has no
-Wreturn-type warning.

[Bug tree-optimization/86214] [8/9 Regression] Strongly increased stack usage

2018-07-04 Thread steinar+gcc at gunderson dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86214

Steinar H. Gunderson  changed:

   What|Removed |Added

  Attachment #44296|0   |1
is obsolete||

--- Comment #3 from Steinar H. Gunderson  ---
Created attachment 44349
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44349=edit
Test case #2

[Bug libstdc++/85671] Lack of `std::move()` inside `operator/` for `std::filesystem::path`.

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85671

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|9.0 |8.2

--- Comment #6 from Jonathan Wakely  ---
Also fixed for 8.2

[Bug libstdc++/86292] Missing exception safety when constructing vector from input iterator pair

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86292

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|9.0 |8.2

--- Comment #5 from Jonathan Wakely  ---
Also fixed for 8.2

[Bug libstdc++/84087] string::assign problem with two arguments

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84087

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|9.0 |8.2

--- Comment #9 from Jonathan Wakely  ---
Fixed for 8.2 now.

[Bug c++/86398] is_trivially_constructible always returns true even when is_constructible returns false

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86398

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
  Component|libstdc++   |c++
   Assignee|unassigned at gcc dot gnu.org  |ville at gcc dot gnu.org
Summary|[8/9 Regression]|is_trivially_constructible
   |is_trivially_constructible  |always returns true even
   |always returns true even|when is_constructible
   |when is_constructible   |returns false
   |returns false   |

--- Comment #5 from Jonathan Wakely  ---
The regression is fixed for 8.2 with a workaround in the library header.

Changing component back to c++ so Ville can fix the intrinisic.

[Bug target/85904] [7/8 Regression] configure issue cross compiling on netbsd, with patch

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85904

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:45:51 2018
New Revision: 262390

URL: https://gcc.gnu.org/viewcvs?rev=262390=gcc=rev
Log:
PR target/85904 check for aligned_alloc on netbsd cross-compilation

Backport from mainline
2018-05-24  Maya Rashish  

PR target/85904
* crossconfig.m4: Test for aligned_alloc on netbsd.
* configure: Regenerate.

Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/configure
branches/gcc-8-branch/libstdc++-v3/crossconfig.m4

[Bug libstdc++/86127] STL containers do not satisfy container.requirements.general clause 8

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86127

--- Comment #11 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:46:43 2018
New Revision: 262393

URL: https://gcc.gnu.org/viewcvs?rev=262393=gcc=rev
Log:
PR libstdc++/86127 avoid unnecessary allocator conversions

There is no need to use an allocator of the correct value_type when
calling allocator_traits::construct and allocator_traits::destroy. The
existing node allocator can be used, instead of constructing a new
allocator object every time.

There's also no benefit to using __gnu_cxx::__alloc_traits instead of
std::allocator_traits to get the pointer and const_pointer types.
std::forward_list is only available for C++11 and later, when
std::allocator_traits is available too.

Backport from mainline
2018-06-13  Jonathan Wakely  

PR libstdc++/86127
* include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
unused typedef.
(_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
Use node allocator to create and destroy elements.
(forward_list::_Tp_alloc_type): Remove unused typedef.
(forward_list::_Alloc_traits): Use allocator_traits instead of
__gnu_cxx::__alloc_traits.

Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/forward_list.h
branches/gcc-8-branch/libstdc++-v3/include/bits/forward_list.tcc

[Bug libstdc++/85098] undefined reference to std::regex::extended

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85098

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:45:04 2018
New Revision: 262389

URL: https://gcc.gnu.org/viewcvs?rev=262389=gcc=rev
Log:
PR libstdc++/85098 add missing definitions for static constants

In C++11 and C++14 any odr-use of these constants requires a definition
at namespace-scope.  In C++17 they are implicitly inline and so the
namespace-scope redeclarations are redundant (and allowing them is
deprecated).

Backport from mainline
2018-05-18  Jonathan Wakely  

PR libstdc++/85098
* include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
(basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
(basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
(basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
definitions.
* include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
whitespace.
* include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
braces around body of do-while.
* testsuite/28_regex/basic_regex/85098.cc: New

Added:
branches/gcc-8-branch/libstdc++-v3/testsuite/28_regex/basic_regex/85098.cc
Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/regex.h
branches/gcc-8-branch/libstdc++-v3/include/bits/regex_automaton.h
branches/gcc-8-branch/libstdc++-v3/include/bits/regex_compiler.tcc

[Bug libstdc++/83982] [6/7/8/9 Regression] Exception guarantee of C++14 vector::resize(size_type) is not met

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83982

--- Comment #8 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:44:51 2018
New Revision: 262387

URL: https://gcc.gnu.org/viewcvs?rev=262387=gcc=rev
Log:
PR libstdc++/83982 fix exception-safety guarantee of std::vector::resize

Construct new elements before moving existing ones, so that if a default
constructor throws, the existing elements are not left in a moved-from
state.

Backport from mainline
2018-06-14  Daniel Trebbien 
Jonathan Wakely  

PR libstdc++/83982
* include/bits/vector.tcc (vector::_M_default_append(size_type)):
Default-construct new elements before moving existing ones.
* testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
New.

Added:
   
branches/gcc-8-branch/libstdc++-v3/testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc
Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/vector.tcc

[Bug libstdc++/85671] Lack of `std::move()` inside `operator/` for `std::filesystem::path`.

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85671

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:44:56 2018
New Revision: 262388

URL: https://gcc.gnu.org/viewcvs?rev=262388=gcc=rev
Log:
PR libstdc++/85671 allow copy elision in path concatenation

By performing the /= operation on a named local variable instead of a
temporary the copy made for the return value can be elided.

Backport from mainline
2018-05-07  Jonathan Wakely  

PR libstdc++/85671
* include/bits/fs_path.h (operator/): Permit copy elision.
* include/experimental/bits/fs_path.h (operator/): Likewise.

Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/fs_path.h
branches/gcc-8-branch/libstdc++-v3/include/experimental/bits/fs_path.h

[Bug libstdc++/86138] [7/8 Regression] C++17: getline(istream, string) crashes on Cygwin because incompatible C++14 function is called

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86138

--- Comment #27 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:44:39 2018
New Revision: 262385

URL: https://gcc.gnu.org/viewcvs?rev=262385=gcc=rev
Log:
Declare some explicit instantiations for strings in Debug Mode

The empty reps and the I/O functions do not need to be implicitly
instantiated to enable assertions, so declare the explicit
instantiations when _GLIBCXX_EXTERN_TEMPLATE == -1 (i.e. when
_GLIBCXX_ASSERTIONS is defined).

Backport from mainline
2018-06-27  Jonathan Wakely  

PR libstdc++/86138
* include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
Declare explicit instantiations of COW empty reps and I/O functions.

Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/basic_string.tcc

[Bug libstdc++/86292] Missing exception safety when constructing vector from input iterator pair

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86292

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:44:45 2018
New Revision: 262386

URL: https://gcc.gnu.org/viewcvs?rev=262386=gcc=rev
Log:
PR libstdc++/86292 fix exception safety of std::vector
constructor

Backport from mainline
2018-06-25  Jonathan Wakely  

PR libstdc++/86292
* include/bits/stl_vector.h (vector::_M_range_initialize):
Add try-catch block.
* testsuite/23_containers/vector/cons/86292.cc: New.

Added:
   
branches/gcc-8-branch/libstdc++-v3/testsuite/23_containers/vector/cons/86292.cc
Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/stl_vector.h

[Bug libstdc++/84087] string::assign problem with two arguments

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84087

--- Comment #8 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:44:24 2018
New Revision: 262382

URL: https://gcc.gnu.org/viewcvs?rev=262382=gcc=rev
Log:
PR libstdc++/84087 add default arguments to basic_string members (LWG 2268)

This change was a DR against C++11 and so should have been implemented
years ago.

Backport from mainline
2018-05-03  Jonathan Wakely  

PR libstdc++/84087 LWG DR 2268 basic_string default arguments
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
(append(const basic_string&, size_type, size_type)
(assign(const basic_string&, size_type, size_type)
(insert(size_type, const basic_string&, size_type, size_type)
(replace(size_type,size_type,const basic_string&,size_type,size_type)
(compare(size_type,size_type,constbasic_string&,size_type,size_type)):
Add default arguments (LWG 2268).
[_GLIBCXX_USE_CXX11_ABI=0]
(append(const basic_string&, size_type, size_type)
(assign(const basic_string&, size_type, size_type)
(insert(size_type, const basic_string&, size_type, size_type)
(replace(size_type,size_type,const basic_string&,size_type,size_type)
(compare(size_type,size_type,constbasic_string&,size_type,size_type)):
Likewise.
* testsuite/21_strings/basic_string/dr2268.cc: New test.

Added:
   
branches/gcc-8-branch/libstdc++-v3/testsuite/21_strings/basic_string/dr2268.cc
Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/bits/basic_string.h

[Bug libstdc++/86398] [8/9 Regression] is_trivially_constructible always returns true even when is_constructible returns false

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86398

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 11:44:11 2018
New Revision: 262381

URL: https://gcc.gnu.org/viewcvs?rev=262381=gcc=rev
Log:
PR libstdc++/86398 fix std::is_trivially_constructible regression

The intrinsic doesn't check for allowed conversions between scalar
types, so restore the std::is_constructible check.

Also make some trivial whitespace changes.

PR libstdc++/86398
* include/std/type_traits (is_trivially_constructible): Check
is_constructible before __is_trivially_constructible.
* testsuite/20_util/is_trivially_constructible/value.cc: Add more
tests, including negative cases.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
zero for dg-error lineno.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.

Modified:
branches/gcc-8-branch/libstdc++-v3/ChangeLog
branches/gcc-8-branch/libstdc++-v3/include/std/type_traits
   
branches/gcc-8-branch/libstdc++-v3/testsuite/20_util/is_trivially_constructible/value.cc
   
branches/gcc-8-branch/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
   
branches/gcc-8-branch/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc

[Bug tree-optimization/86401] The "For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,..." opts are only in fold-const.c and in RTL

2018-07-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86401

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-07-04
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug tree-optimization/86401] New: The "For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,..." opts are only in fold-const.c and in RTL

2018-07-04 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86401

Bug ID: 86401
   Summary: The "For constants M and N, if M == (1LL << cst) - 1
&& (N & M) == M,..." opts are only in fold-const.c and
in RTL
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

unsigned long long foo (unsigned long long __x, unsigned int __s)
{
  int _Nd = 64;
  unsigned int _sN = __s % _Nd;
  return (__x << _sN) | (__x >> ((_Nd - _sN) % _Nd));
}

is not optimized into a simple rotate, while:
unsigned long long foo (unsigned long long __x, unsigned int __s)
{
  constexpr int _Nd = 64;
  unsigned int _sN = __s % _Nd;
  return (__x << _sN) | (__x >> ((_Nd - _sN) % _Nd));
}
is.  This is because the:
For constants M and N, if M == (1LL << cst) - 1 && (N & M) == M,
((A & N) + B) & M -> (A + B) & M
Similarly if (N & M) == 0,
((A | N) + B) & M -> (A + B) & M
and for - instead of + (or unary - instead of +)
and/or ^ instead of |.
If B is constant and (B & M) == 0, fold into A & M.
optimizations are done in fold-const.c only.

Further testcase:
unsigned f1 (unsigned x) { unsigned m = 64; return (m + x) & (m - 1); }
unsigned f2 (unsigned x) { return (64 + x) & 63; }
unsigned f3 (unsigned x) { unsigned m = 64; return (x + m) & (m - 1); }
unsigned f4 (unsigned x) { return (x + 64) & 63; }
unsigned f5 (unsigned x) { unsigned m = 64; return (m - x) & (m - 1); }
unsigned f6 (unsigned x) { return (64 - x) & 63; }
unsigned f7 (unsigned x) { unsigned m = 64; return (x - m) & (m - 1); }
unsigned f8 (unsigned x) { return (x - 64) & 63; }
unsigned f9 (unsigned x, unsigned y) { unsigned m = 64, n = 256 | (m - 1);
return ((x & n) + y) & (m - 1); }
unsigned f10 (unsigned x, unsigned y) { return ((x & 319) + y) & 63; }
unsigned f11 (unsigned x, unsigned y) { unsigned m = 64, n = -128; return ((x |
n) + y) & (m - 1); }
unsigned f12 (unsigned x, unsigned y) { return ((x | -128) + y) & 63; }
unsigned f13 (unsigned x, unsigned y) { unsigned m = 64, n = -384; return ((x ^
n) + y) & (m - 1); }
unsigned f14 (unsigned x, unsigned y) { return ((x ^ -384) + y) & 63; }
unsigned f15 (unsigned x, unsigned y) { unsigned m = 64, n = 256 | (m - 1);
return (y + (x & n)) & (m - 1); }
unsigned f16 (unsigned x, unsigned y) { return (y + (x & 319)) & 63; }
unsigned f17 (unsigned x, unsigned y) { unsigned m = 64, n = -128; return (y +
(x | n)) & (m - 1); }
unsigned f18 (unsigned x, unsigned y) { return (y + (x | -128)) & 63; }
unsigned f19 (unsigned x, unsigned y) { unsigned m = 64, n = -384; return (y +
(x ^ n)) & (m - 1); }
unsigned f20 (unsigned x, unsigned y) { return (y + (x ^ -384)) & 63; }
unsigned f21 (unsigned x, unsigned y) { unsigned m = 64, n = 256 | (m - 1);
return ((x & n) - y) & (m - 1); }
unsigned f22 (unsigned x, unsigned y) { return ((x & 319) - y) & 63; }
unsigned f23 (unsigned x, unsigned y) { unsigned m = 64, n = -128; return ((x |
n) - y) & (m - 1); }
unsigned f24 (unsigned x, unsigned y) { return ((x | -128) - y) & 63; }
unsigned f25 (unsigned x, unsigned y) { unsigned m = 64, n = -384; return ((x ^
n) - y) & (m - 1); }
unsigned f26 (unsigned x, unsigned y) { return ((x ^ -384) - y) & 63; }
unsigned f27 (unsigned x, unsigned y) { unsigned m = 64, n = 256 | (m - 1);
return (y - (x & n)) & (m - 1); }
unsigned f28 (unsigned x, unsigned y) { return (y - (x & 319)) & 63; }
unsigned f29 (unsigned x, unsigned y) { unsigned m = 64, n = -128; return (y -
(x | n)) & (m - 1); }
unsigned f30 (unsigned x, unsigned y) { return (y - (x | -128)) & 63; }
unsigned f31 (unsigned x, unsigned y) { unsigned m = 64, n = -384; return (y -
(x ^ n)) & (m - 1); }
unsigned f32 (unsigned x, unsigned y) { return (y - (x ^ -384)) & 63; }
unsigned f33 (unsigned x) { unsigned m = 64, n = 256 | (m - 1); return (-(x &
n)) & (m - 1); }
unsigned f34 (unsigned x) { return (-(x & 319)) & 63; }
unsigned f35 (unsigned x) { unsigned m = 64, n = -128; return (-(x | n)) & (m -
1); }
unsigned f36 (unsigned x) { return (-(x | -128)) & 63; }
unsigned f37 (unsigned x) { unsigned m = 64, n = -384; return (-(x ^ n)) & (m -
1); }
unsigned f38 (unsigned x) { return (-(x ^ -384)) & 63; }

[Bug libstdc++/86398] [8/9 Regression] is_trivially_constructible always returns true even when is_constructible returns false

2018-07-04 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86398

--- Comment #3 from Jonathan Wakely  ---
Author: redi
Date: Wed Jul  4 09:03:18 2018
New Revision: 262379

URL: https://gcc.gnu.org/viewcvs?rev=262379=gcc=rev
Log:
PR libstdc++/86398 fix std::is_trivially_constructible regression

The intrinsic doesn't check for allowed conversions between scalar
types, so restore the std::is_constructible check.

Also make some trivial whitespace changes.

PR libstdc++/86398
* include/std/type_traits (is_trivially_constructible): Check
is_constructible before __is_trivially_constructible.
* testsuite/20_util/is_trivially_constructible/value.cc: Add more
tests, including negative cases.
* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
zero for dg-error lineno.
* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
Likewise.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/type_traits
trunk/libstdc++-v3/testsuite/20_util/is_trivially_constructible/value.cc
   
trunk/libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs_neg.cc
   
trunk/libstdc++-v3/testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc

[Bug c++/86400] [8/9 regression] set::set

2018-07-04 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86400

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-07-04
 CC||jwakely.gcc at gmail dot com,
   ||rguenth at gcc dot gnu.org
   Target Milestone|--- |8.2
Summary|[8 regression]  |[8/9 regression]
   |set::set::set ---
Note it works with the old string ABI so maybe it's a libstdc++ issue after
all.

[Bug bootstrap/86376] recent breakage in ubsan build ?

2018-07-04 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86376

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Martin Liška  ---
And with that: https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00145.html
current trunk is also fine for me. Thus closing. Please reopen if still exists.

  1   2   >