[Bug c++/100368] New: Missing guaranteed elision in constexpr evaluation

2021-04-30 Thread rs2740 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100368

Bug ID: 100368
   Summary: Missing guaranteed elision in constexpr evaluation
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rs2740 at gmail dot com
  Target Milestone: ---

struct S {
  S() = default;
  S(const S&) = delete;
};

struct array {
  S s[2];
};

struct PS {
  constexpr array operator*() const { return {}; }
};

struct W {
  constexpr W(const PS& p)   // 1
: t(*p) {}
  array t;
};

W w(PS{});

This issues a spurious complaint on trunk and then ICEs:

source>: In constructor 'constexpr W::W(const PS&)':
:17:14: error: use of deleted function 'array::array(array&&)'
   17 | : t(*p) {}
  |  ^
:7:8: note: 'array::array(array&&)' is implicitly deleted because the
default definition would be ill-formed:
7 | struct array {
  |^
:7:8: error: use of deleted function 'S::S(S&&)'
:4:3: note: declared here
4 |   S(S&&) = delete;
  |   ^
:17:14: internal compiler error: tree check: expected target_expr, have
error_mark in bot_manip, at cp/tree.c:3095
   17 | : t(*p) {}
  |  ^
0x1d002c9 internal_error(char const*, ...)
???:0
0x67b4e3 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
???:0
0x13967e3 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*))
???:0
0x9ad0ae break_out_target_exprs(tree_node*, bool)
???:0
0x72aa0a maybe_save_constexpr_fundef(tree_node*)
???:0
0x7b0711 finish_function(bool)
???:0
0x8e2c4d c_parse_file()
???:0
0xa63232 c_common_parse_file()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

Removing the constexpr on the line marked #1 makes it compile. Both clang and
MSVC accept the original code.

[Bug c++/100367] New: g++ internal compiler error when std::lexicographical_compare_three_way third and fourth argument are reverse iterators

2021-04-30 Thread gccbugzilla at thepirate42 dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100367

Bug ID: 100367
   Summary: g++ internal compiler error when
std::lexicographical_compare_three_way third and
fourth argument are reverse iterators
   Product: gcc
   Version: 11.1.0
   URL: https://godbolt.org/z/jxbaea4fY
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gccbugzilla at thepirate42 dot org
  Target Milestone: ---

When I try to compile this code


#include 
#include 

int main(){
  std::vector a(2,1);
  std::vector b(2,1);
 
std::lexicographical_compare_three_way(a.begin(),a.end(),b.rbegin(),b.rend());
  return 0;
}


with this command line


g++ -v -Wall -Wextra -std=c++20 test2.cpp


I get this output:


Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/program\
files/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.1.0-mingw-w64-8.0.0-r1/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/11.1.0/lto-wrapper.exe
OFFLOAD_TARGET_NAMES=nvptx-none
Target: x86_64-w64-mingw32
Configured with: ../configure
--prefix=/R/winlibs64_stage/inst_gcc-11.1.0/share/gcc
--build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32
--enable-offload-targets=nvptx-none --with-pkgversion='MinGW-W64
x86_64-posix-seh, built by Brecht Sanders' --with-tune=generic
--enable-checking=release --enable-threads=posix --disable-sjlj-exceptions
--disable-libunwind-exceptions --disable-serial-configure --disable-bootstrap
--enable-host-shared --enable-plugin --disable-default-ssp --disable-rpath
--enable-libstdcxx-pch --enable-libstdcxx-time=yes --disable-libstdcxx-debug
--disable-version-specific-runtime-libs --with-stabs --disable-symvers
--enable-languages=c,c++,fortran,lto,objc,obj-c++ --disable-gold --disable-nls
--disable-stage1-checking --disable-win32-registry --disable-multilib
--enable-ld --enable-libquadmath --enable-libada --enable-libssp
--enable-libstdcxx --enable-lto --enable-fully-dynamic-string --enable-libgomp
--enable-graphite --enable-mingw-wildcard
--with-mpc=/d/Prog/winlibs64_stage/custombuilt
--with-mpfr=/d/Prog/winlibs64_stage/custombuilt
--with-gmp=/d/Prog/winlibs64_stage/custombuilt
--with-isl=/d/Prog/winlibs64_stage/custombuilt --enable-install-libiberty
--enable-__cxa_atexit --without-included-gettext --with-diagnostics-color=auto
--enable-clocale=generic --with-libiconv --with-system-zlib
--with-build-sysroot=/R/winlibs64_stage/gcc-11.1.0/build_mingw/mingw-w64
CFLAGS=-I/d/Prog/winlibs64_stage/custombuilt/include/libdl-win32
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.1.0 (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 
COLLECT_GCC_OPTIONS='-v' '-Wall' '-Wextra' '-std=c++20' '-shared-libgcc'
'-mtune=generic' '-march=x86-64' '-dumpdir' 'a-'
 c:/program
files/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.1.0-mingw-w64-8.0.0-r1/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/11.1.0/cc1plus.exe
-quiet -v -iprefix c:\program
files\mingw-w64\winlibs-x86_64-posix-seh-gcc-11.1.0-mingw-w64-8.0.0-r1\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.1.0/
-D_REENTRANT test2.cpp -quiet -dumpdir a- -dumpbase test2.cpp -dumpbase-ext
.cpp -mtune=generic -march=x86-64 -Wall -Wextra -std=c++20 -version -o
C:\Users\piez\AppData\Local\Temp\ccUgxbmg.s
GNU C++20 (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) version 11.1.0
(x86_64-w64-mingw32)
compiled by GNU C version 11.1.0, GMP version 6.2.1, MPFR version
4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/program
files/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.1.0-mingw-w64-8.0.0-r1/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../include/c++/11.1.0"
ignoring duplicate directory "c:/program
files/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.1.0-mingw-w64-8.0.0-r1/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../include/c++/11.1.0/x86_64-w64-mingw32"
ignoring duplicate directory "c:/program
files/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.1.0-mingw-w64-8.0.0-r1/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.1.0/../../../../include/c++/11.1.0/backward"
ignoring duplicate directory "c:/program
files/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.1.0-mingw-w64-8.0.0-r1/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.1.0/include"
ignoring nonexistent directory
"R:/winlibs64_stage/inst_gcc-11.1.0/share/gcc/include"
ignoring nonexistent directory
"/R/winlibs64_stage/inst_gcc-11.1.0/share/gcc/include"
ignoring duplicate directory "c:/program
files/mingw-w64/winlibs-x86_64-posix-seh-gcc-11.1.0-mingw-w64-8.0.0-r1/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.1.0/include-fixed"
ignoring duplicate directory "c:/program

[Bug c++/100366] New: spurious warning - std::vector::clear followed by std::vector::insert(vec.end(), ...) with -O2

2021-04-30 Thread mrsam--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366

Bug ID: 100366
   Summary: spurious warning - std::vector::clear followed by
std::vector::insert(vec.end(), ...) with -O2
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mr...@courier-mta.com
  Target Milestone: ---

I'm seeing this with both gcc 11.1 on: https://godbolt.org/z/1Wv9jj3r1

and gcc (GCC) 11.0.1 20210324 (Red Hat 11.0.1-0), below:

Compiling the following with -O2 -Wall -Werror:

#include 
#include 

static char UTC[4];

void func(std::vector )
{
vec.clear();
vec.insert(vec.end(), UTC, UTC+4);
}

This generates a massive complaint that boils down to:

/usr/include/c++/11/bits/stl_algobase.h:431:30: error: ‘void*
__builtin_memcpy(v
oid*, const void*, long unsigned int)’ writing 1 or more bytes into a region of 
size 0 overflows the destination [-Werror=stringop-overflow=]
  431 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
  | ~^~~
In file included from
/usr/include/c++/11/x86_64-redhat-linux/bits/c++allocator.

...skipping 1 line
 from /usr/include/c++/11/bits/allocator.h:46,
 from /usr/include/c++/11/vector:64,
 from t.C:1:

Removing vec.clear() makes this go away.

Adding vec.reserve(4) after vec.clear() makes this go away.

[Bug c/100360] scalar operation fails the compilation

2021-04-30 Thread aliaga at uji dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100360

--- Comment #2 from aliaga at uji dot es ---
(In reply to Andrew Pinski from comment #1)
> This is most likely due to this:
> warning: GMP header version 6.2.0 differs from library version 6.2.1.
> 
> Can you make sure you have the correct version of GMP installed and such.

Hi,

Thank you very much for your quick answer!!

I downloaded and installed the version 6.2.1 of GMP library in a local
directory, but the code attached in the bug doesn't use the GMP library.
Therefore, why does this error happen? 

In any case, I have recompiled the codes, and now the error doesn't occur. I
don't understand why. 

It is true that the first error occurred in a larger code where GMP 6.2.1 was
used. From this, I reduced the code trying to isolate the problem, removing the
use of GMP and generating a really short code. The only reasoning to justify
the solution could be that I have reconnected to the machine, but it is rare.

Given that the error no longer occurs, I want to thank you again your help.

Best regards,

  José I. Aliaga

[Bug c++/100362] [11/12 Regression] ICE with Boost.Asio async_initiate

2021-04-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100362

Marek Polacek  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
Summary|ICE with Boost.Asio |[11/12 Regression] ICE with
   |async_initiate  |Boost.Asio async_initiate
 CC||ppalka at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
template  struct remove_cv { using type = _Tp; };
class async_result {
public:
  template 
  static void initiate(Initiation initiation, RawCompletionToken token) {
initiation(token);
  }
};
template 
void async_initiate(Initiation initiation, CompletionToken token) {
  async_result::initiate(initiation, token);
}
template  class allocator {};
template  void allocate_shared(_Alloc) { }
template  void make_shared() {
  allocate_shared<_Tp>(allocator::type>());
}
template  class Foo {};
template  class Qux {
public:
  template 
  decltype(auto) AsyncOp(CompletionToken &&);
  int a_;
};
template 
template 
decltype(auto) Qux::AsyncOp(CompletionToken &) {
  using SignatureType = void;
  async_initiate(
  [this](auto) {
struct Grault : Foo {};
auto ptr{make_shared};
  },
  token);
}
void corge() {
  Qux qux;
  qux.AsyncOp([] {});
}

$ xg++-10 -c 100362.C
$ xg++-11 -c 100362.C
100362.C: In instantiation of ‘struct Qux::AsyncOp
>(corge()::&&)Grault’:
100362.C:16:23:   required from ‘void make_shared() [with _Tp =
Qux::AsyncOp
>(corge()::&&)Grault]’
100362.C:32:14:   required from ‘Qux::AsyncOp
>(corge()::&&):: [with auto:1 = corge()::]’
100362.C:6:15:   required from ‘static void async_result::initiate(Initiation,
RawCompletionToken) [with Initiation = Qux::AsyncOp
>(corge()::&&)::; RawCompletionToken =
corge()::]’
100362.C:11:25:   required from ‘void async_initiate(Initiation,
CompletionToken) [with CompletionToken = corge()::;
 = void; Initiation =
Qux::AsyncOp
>(corge()::&&)::]’
100362.C:29:49:   required from ‘decltype(auto) Qux< 
>::AsyncOp(CompletionToken&&) [with CompletionToken = corge()::;
 = int]’
100362.C:38:14:   required from here
100362.C:30:18: internal compiler error: in lookup_template_class_1, at
cp/pt.c:10005
   30 |   [this](auto) {
  |  ^
0xd154c5 lookup_template_class_1
/home/mpolacek/src/gcc11/gcc/cp/pt.c:10005
0xd16c95 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:10244
0xd2585c tsubst_aggr_type
/home/mpolacek/src/gcc11/gcc/cp/pt.c:13639
0xd3227f tsubst(tree_node*, tree_node*, int, tree_node*)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:15578
0xd3221f tsubst(tree_node*, tree_node*, int, tree_node*)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:15569
0xd2d9d6 tsubst_decl
/home/mpolacek/src/gcc11/gcc/cp/pt.c:14583
0xd36633 tsubst_copy
/home/mpolacek/src/gcc11/gcc/cp/pt.c:16661
0xd4eeef tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:20821
0xd492ec tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:19719
0xd4774c tsubst_non_call_postfix_expression
/home/mpolacek/src/gcc11/gcc/cp/pt.c:19292
0xd4daed tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:20601
0xd4711f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:19198
0xd2f8c2 tsubst_decl
/home/mpolacek/src/gcc11/gcc/cp/pt.c:14933
0xd37939 tsubst_copy
/home/mpolacek/src/gcc11/gcc/cp/pt.c:16796
0xd4eeef tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:20821
0xd492ec tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:19719
0xd4774c tsubst_non_call_postfix_expression
/home/mpolacek/src/gcc11/gcc/cp/pt.c:19292
0xd4daed tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:20601
0xd34dbb tsubst(tree_node*, tree_node*, int, tree_node*)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:16223
0xd2036e tsubst_template_arg(tree_node*, tree_node*, int, tree_node*)
/home/mpolacek/src/gcc11/gcc/cp/pt.c:12300

[Bug tree-optimization/100363] gcc generating wider load/store than warranted at -O3

2021-04-30 Thread vgupta at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

--- Comment #6 from Vineet Gupta  ---
(In reply to Linus Torvalds from comment #4)
> (In reply to Andrew Pinski from comment #1)
> > The loop gets vectorized, I don't see the problem really.
> 
> 
> See
> 
>
> https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/372
> 
> and in particular the comment
> 
>"In the first 8-byte copy, src and dst overlap"
> 
> so apparently gcc has decided that they can't overlap, despite the two
> pointers being literally generated from the same base pointer.

Exactly:

> But I don't real arc assembly, so I'll have to take Vineet's word for it.

fwiw:
LDD.a [base, off] is 8-byte load with pre-incr : eff addr = base + offset
STD.ab [base, off] is 8-byte store with post-incr: eff addr = base


> Vineet, have you been able to generate a smaller test-case?

No I'm afraid not.

[Bug tree-optimization/100363] gcc generating wider load/store than warranted at -O3

2021-04-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |UNCONFIRMED
 Ever confirmed|1   |0

[Bug tree-optimization/100363] gcc generating wider load/store than warranted at -O3

2021-04-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

Andrew Pinski  changed:

   What|Removed |Added

  Component|middle-end  |tree-optimization
   Keywords||wrong-code

--- Comment #5 from Andrew Pinski  ---
On the trunk, on aarch64:
There should be an aliasing check 

  sfrom_289 = from_176 + 18446744073709551615;
  _871 = _843 + 18446744073709551615;
  _872 = _871 > 6;
  _873 = prephitmp_803 + 2;
  _874 = from_176 + 3;
  _875 = _873 - _874;
  _876 = (sizetype) _875;
  _877 = _876 > 12;
  _878 = _872 & _877;
  if (_878 != 0)
goto ; [80.00%]
  else
goto ; [20.00%]


_873 is the sout


In GCC 10 branch we get something similar:
  sfrom_289 = from_176 + 18446744073709551615;
  _859 = _823 + 18446744073709551615;
  _860 = _859 > 8;
  _861 = prephitmp_783 + 2;
  _862 = from_176 + 3;
  _863 = _861 - _862;
  _864 = (sizetype) _863;
  _865 = _864 > 12;
  _866 = _860 & _865;
  if (_866 != 0)
goto ; [80.00%]
  else
goto ; [20.00%]

But I Notice 8 vs 6 here.

[Bug c/100365] New: bogus -Wreturn-type with a return statement with an erroneous expression

2021-04-30 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100365

Bug ID: 100365
   Summary: bogus -Wreturn-type with a return statement with an
erroneous expression
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The C front end issues a spurious -Wreturn-type warning for return statements
with erroneous arguments in non-void functions.  The C++ front end does a
better job (and Clang better still):

$ cat z.c && gcc -S -Wall z.cint f ()
{
  return x;
}

int g ()
{
  return (int);
}

int h ()
{
  return ++0;
}
z.c: In function ‘f’:
z.c:3:10: error: ‘x’ undeclared (first use in this function)
3 |   return x;
  |  ^
z.c:3:10: note: each undeclared identifier is reported only once for each
function it appears in
z.c: In function ‘g’:
z.c:8:15: error: expected expression before ‘;’ token
8 |   return (int);
  |   ^
z.c: In function ‘h’:
z.c:13:10: error: lvalue required as increment operand
   13 |   return ++0;
  |  ^~
z.c: In function ‘f’:
z.c:4:1: warning: control reaches end of non-void function [-Wreturn-type]
4 | }
  | ^
z.c: In function ‘g’:
z.c:9:1: warning: control reaches end of non-void function [-Wreturn-type]
9 | }
  | ^
z.c: In function ‘h’:
z.c:14:1: warning: control reaches end of non-void function [-Wreturn-type]
   14 | }
  | ^

G++ issues just the four errors below:

z.c: In function ‘int f()’:
z.c:3:10: error: ‘x’ was not declared in this scope
3 |   return x;
  |  ^
z.c: In function ‘int g()’:
z.c:8:11: error: expected primary-expression before ‘int’
8 |   return (int);
  |   ^~~
z.c:8:11: error: expected ‘)’ before ‘int’
8 |   return (int);
  |  ~^~~
  |   )
z.c: In function ‘int h()’:
z.c:13:12: error: lvalue required as increment operand
   13 |   return ++0;
  |^


Clang:

z.c:3:10: error: use of undeclared identifier 'x'
  return x;
 ^
z.c:8:15: error: expected expression
  return (int);
  ^
z.c:13:10: error: expression is not assignable
  return ++0;
 ^ ~
3 errors generated.

[Bug middle-end/100363] gcc generating wider load/store than warranted at -O3

2021-04-30 Thread torvalds--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

Linus Torvalds  changed:

   What|Removed |Added

 CC||torvalds@linux-foundation.o
   ||rg

--- Comment #4 from Linus Torvalds  ---
(In reply to Andrew Pinski from comment #1)
> The loop gets vectorized, I don't see the problem really.


See

   
https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/372

and in particular the comment

   "In the first 8-byte copy, src and dst overlap"

so apparently gcc has decided that they can't overlap, despite the two pointers
being literally generated from the same base pointer.

But I don't real arc assembly, so I'll have to take Vineet's word for it.

Vineet, have you been able to generate a smaller test-case?

[Bug middle-end/100363] gcc generating wider load/store than warranted at -O3

2021-04-30 Thread vgupta at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

--- Comment #3 from Vineet Gupta  ---
Created attachment 50723
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50723=edit
preprocessed source file (with extra nop annotation)

[Bug middle-end/100363] gcc generating wider load/store than warranted at -O3

2021-04-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

--- Comment #2 from Andrew Pinski  ---
Note in the tar file there is only:
inffast2.s  inffast2.s.aarch64.gcc10.O3  inffast2.s.aarch64.gcc9.O3 
inffast2.s.arc.gcc10.O3

[Bug middle-end/100363] gcc generating wider load/store than warranted at -O3

2021-04-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
The loop gets vectorized, I don't see the problem really.

Also I don't see the preprocessed source.  Can you attach that?

Is the problem that the loads have to be done in 2 bytes always from the
hardware?
If so then you need to mark the pointer as volatile.

[Bug c++/100362] ICE with Boost.Asio async_initiate

2021-04-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100362

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 CC||mpolacek at gcc dot gnu.org
   Last reconfirmed||2021-04-30
 Ever confirmed|0   |1
   Keywords||ice-on-valid-code

--- Comment #1 from Marek Polacek  ---
Started with r11-6815.  Reducing...

[Bug c++/67491] [meta-bug] concepts issues

2021-04-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 85137, which changed state.

Bug 85137 Summary: [concepts] ICE with undeclared concept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85137

   What|Removed |Added

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

[Bug c++/85137] [concepts] ICE with undeclared concept

2021-04-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85137

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #3 from Marek Polacek  ---
No longer ICEs since r276764.

[Bug c++/86663] g++ ICE with -std=c++11: internal compiler error: Segmentation fault

2021-04-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86663

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
Fixed by r11-4229.

[Bug c++/95159] ICE on aggregate template parameter with empty angle brackets

2021-04-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95159

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||mpolacek at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #6 from Marek Polacek  ---
Fixed by r12-100.

[Bug c++/99697] ICE for class template partial specialization over non-template (structural class template) parameter of deduced class type

2021-04-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99697

Marek Polacek  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 CC||mpolacek at gcc dot gnu.org
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Marek Polacek  ---
Fixed by r12-100.

[Bug c/100360] scalar operation fails the compilation

2021-04-30 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100360

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Target||x86_64-linux-gnu
 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2021-04-30

--- Comment #1 from Andrew Pinski  ---
This is most likely due to this:
warning: GMP header version 6.2.0 differs from library version 6.2.1.

Can you make sure you have the correct version of GMP installed and such.

[Bug testsuite/100346] [11 regression] printf tests fail after r11-6755

2021-04-30 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100346

--- Comment #3 from seurer at gcc dot gnu.org ---
It was failing with binutils 2.27 (I believe, it was the distro one) and when I
switched to binutils 2.36.1 it works.

[Bug testsuite/100364] New: New test case gcc.c-torture/execute/ieee/cdivchkld.c in r12-228 fails

2021-04-30 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100364

Bug ID: 100364
   Summary: New test case gcc.c-torture/execute/ieee/cdivchkld.c
in r12-228 fails
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:54f0224d55a1b56dde092460ddf76913670e6efc, r12-228

These are the failures on a powerpc64 BE system and there are similar on LE:

FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O1 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O1 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O2 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O2 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O2 -flto
-fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O2 -flto
-fno-use-linker-plugin -flto-partition=none 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O2 -flto
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O2 -flto
-fuse-linker-plugin -fno-fat-lto-objects 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -O3 -g 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -Os 
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c execution,  -Os 


(gdb) run
Starting program: cdivchkld.x1 

Program received signal SIGABRT, Aborted.
0x77c20468 in raise () from /lib/powerpc64le-linux-gnu/libc.so.6
(gdb) where
#0  0x77c20468 in raise () from /lib/powerpc64le-linux-gnu/libc.so.6
#1  0x77bf7cd0 in abort () from /lib/powerpc64le-linux-gnu/libc.so.6
#2  0x1dd4 in main (argc=, argv=) at
/home/seurer/gcc/git/gcc-trunk/gcc/testsuite/gcc.c-torture/execute/ieee/cdivchkld.c:166

(gdb) list
161   if (!match (c,z)){
162 ok = 0;
163   }
164 }
165   if (!ok)
166 abort ();
167   exit (0);
168 }

[Bug c/100363] New: gcc generating wider load/store than warranted at -O3

2021-04-30 Thread vgupta at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100363

Bug ID: 100363
   Summary: gcc generating wider load/store than warranted at -O3
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vgupta at synopsys dot com
  Target Milestone: ---

Created attachment 50722
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50722=edit
test case with an additional nop to annotate codegen

In Linux kernel's initramfs gzip inflate code, an inner copy loop using
unsigned short pointers (src/dst) is generated with wider 8 or 16-byte at a
time (vs. 2 bytes at a time) causing extra/unintended bytes to be copied -
leading to corruption of inflated files on target.

The showed up on upstream v5.6 Linux kernel built for ARC (defaults to -O3).
Issue doesn't happen at -O2.

Full test case attached, but the gist of it is:

lib/zlib_inflate/inffast.c

if (dist > 2) {
unsigned short *sfrom;

sfrom = (unsigned short *)(from);
loops = len >> 1;
do
*sout++ = *sfrom++;

while (--loops);
out = (unsigned char *)sout;
from = (unsigned char *)sfrom;
}
...

@sfrom and @sout are unsigned short pointers and thus expected to work on 2
bytes. However at -O3 gcc is generating wide loads (8-byte LDD/STD on ARCv2,
16-byte LDR q0 on aarch64.

For aarch64, it seems there's code generated for 16-byte access as well as
2-byte, and I haven't verified if it elides the 16-byte code based on size etc
- but the code is generated nonetheless. For ARC 8-byte loop is certainly
executed causing bad things as described

The issue was originally seen with mainline gcc 10.2 (again both ARC and
aarch64) at -O3 and I can confirm it exists in gcc 9.3 as well.

Attaching preprocessed source file is from ARC linux build (but builds for
aarch64 too since non of arch specific functions are used here.

[Bug target/100085] Bad code for union transfer from __float128 to vector types

2021-04-30 Thread bergner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100085

--- Comment #6 from Peter Bergner  ---
(In reply to Steven Munroe from comment #5)
> Any progress on this?

Sorry, not yet.  We've been busy with P10 items and the gcc11 release.  It is
on our list for looking into.

[Bug target/92846] [ARC] floating point compares not generating Invalid Operand

2021-04-30 Thread vgupta at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92846

Vineet Gupta  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED
Summary|[ARC] gloating point|[ARC] floating point
   |compares not generating |compares not generating
   |Invalid Operand |Invalid Operand

--- Comment #4 from Vineet Gupta  ---
Resolved via

2019-12-12 fbf8314b0a8d [ARC] generate signaling FDCMPF for hard float
comparisons

[Bug target/92845] [ARC] gcc not generating hardware compare instruction FDCMP for -mcpu=hs38_linux

2021-04-30 Thread vgupta at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92845

Vineet Gupta  changed:

   What|Removed |Added

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

--- Comment #2 from Vineet Gupta  ---
Addressed via 

2019-12-12 48f13fb118fe [ARC] Use hardware support for double-precision compare
instructions.

[Bug target/89838] [ARC] ICE building glibc testsuite

2021-04-30 Thread vgupta at synopsys dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89838

Vineet Gupta  changed:

   What|Removed |Added

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

--- Comment #4 from Vineet Gupta  ---
closing per fix pointed by Claudiu !

[Bug target/100348] RISC-V extra pointer adjustments for memcpy() from glibc

2021-04-30 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100348

Jim Wilson  changed:

   What|Removed |Added

 CC||wilson at gcc dot gnu.org

--- Comment #1 from Jim Wilson  ---
Most glibc targets already have an assembly language memcpy.S implementation. 
RISC-V should also.  This is likely the most effective solution to the problem. 
 We should fix the optimizer problem if possible of course.  It is just that
the glibc solution is likely easier than the gcc solution.

[Bug target/100348] RISC-V extra pointer adjustments for memcpy() from glibc

2021-04-30 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100348

Jim Wilson  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-04-30
 Ever confirmed|0   |1

[Bug c++/100362] New: ICE with Boost.Asio async_initiate

2021-04-30 Thread enolan at alumni dot cmu.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100362

Bug ID: 100362
   Summary: ICE with Boost.Asio async_initiate
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: enolan at alumni dot cmu.edu
  Target Milestone: ---

Created attachment 50721
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50721=edit
Preprocessed file that triggers the bug.

> the exact version of GCC

gcc version 11.0.1 20210417 (experimental) [master revision
c1c86ab96c2:b6fb0ccbb48:8ae884c09fbba91e9cec391290ee4a2859e7ff41] (Ubuntu
11-20210417-1ubuntu1)

> the system type

Ubuntu 21.04

> the options given when GCC was configured/built

Configured with: ../src/configure -v --with-pkgversion='Ubuntu
11-20210417-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-11
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib
--enable-libphobos-checking=release --with-target-system-zlib=auto
--enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-11-pzZXCn/gcc-11-11-20210417/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-pzZXCn/gcc-11-11-20210417/debian/tmp-gcn/usr
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-build-config=bootstrap-lto-lean --enable-link-serialization=2

> the complete command line that triggers the bug

g++ -I$HOME/boost_1_76_0/ -std=c++17 -save-temps -c ./ice.cpp

> the compiler output (error messages, warnings, etc.)

./ice.cpp: In instantiation of 'struct
Qux::AsyncOp
>(corge()::&&)Grault':
/usr/include/c++/11/bits/shared_ptr_base.h:1358:63:   required by substitution
of 'template struct
std::__shared_ptr::AsyncOp
>(corge()::&&)Grault,
__gnu_cxx::_S_atomic>::__has_esft_base<_Yp, std::__void_t&>(), declval<_Yp*>()))> > [with _Yp =
Qux::AsyncOp
>(corge()::&&)Grault]'
/usr/include/c++/11/bits/shared_ptr_base.h:1380:45:   required by substitution
of 'template typename std::enable_if<(!
std::__shared_ptr::AsyncOp
>(corge()::&&)Grault,
__gnu_cxx::_S_atomic>::__has_esft_base<_Yp2, void>::value), void>::type
std::__shared_ptr::AsyncOp
>(corge()::&&)Grault,
__gnu_cxx::_S_atomic>::_M_enable_shared_from_this_with<_Yp, _Yp2>(_Yp*) [with
_Yp = Qux::AsyncOp
>(corge()::&&)Grault; _Yp2 =
Qux::AsyncOp
>(corge()::&&)Grault]'
/usr/include/c++/11/bits/shared_ptr_base.h:1338:35:   required from
'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>,
_Args&& ...) [with _Alloc =
std::allocator::AsyncOp
>(corge()::&&)Grault>; _Args = {}; _Tp =
Qux::AsyncOp
>(corge()::&&)Grault; __gnu_cxx::_Lock_policy _Lp
= __gnu_cxx::_S_atomic]'
/usr/include/c++/11/bits/shared_ptr.h:409:59:   required from
'std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...)
[with _Alloc = std::allocator::AsyncOp
>(corge()::&&)Grault>; _Args = {}; _Tp =
Qux::AsyncOp
>(corge()::&&)Grault]'
/usr/include/c++/11/bits/shared_ptr.h:860:14:   required from
'std::shared_ptr<_Tp> std::allocate_shared(const _Alloc&, _Args&& ...) [with
_Tp = Qux::AsyncOp
>(corge()::&&)Grault; _Alloc =
std::allocator::AsyncOp
>(corge()::&&)Grault>; _Args = {}]'
/usr/include/c++/11/bits/shared_ptr.h:876:39:   required from
'std::shared_ptr<_Tp> std::make_shared(_Args&& ...) [with _Tp =
Qux::AsyncOp
>(corge()::&&)Grault; _Args = {}]'
./ice.cpp:24:42:   required from
'Qux::AsyncOp
>(corge()::&&):: [with auto:1 = corge()::]'
/home/enolan/boost_1_76_0/boost/asio/async_result.hpp:152:42:   required from
'static boost::asio::async_result::return_type
boost::asio::async_result::initiate(Initiation&&,
RawCompletionToken&&, Args&& ...) [with Initiation =
Qux::AsyncOp
>(corge()::&&)::; RawCompletionToken =
corge()::; Args = {}; CompletionToken = corge()::;
Signature = void(); boost::asio::async_result::return_type = void]'
/home/enolan/boost_1_76_0/boost/asio/async_result.hpp:365:25:   required from
'typename
boost::asio::constraint::value, decltype (boost::asio::async_result::type,
Signature>::initiate(declval(), declval(),
(declval)()...))>::type boost::asio::async_initiate(Initiation&&,
CompletionToken&, Args&& ...) [with CompletionToken = corge()::;
Signature = void(); Initiation =

[Bug target/100361] New: gcc-11 for msp430-elf fails to build: src/c++17/floating_to_chars.cc:107: d2fixed_full_table.h:1283:23: error: size of array ‘POW10_SPLIT_2’ exceeds maximum object size ‘32767

2021-04-30 Thread slyfox at gcc dot gnu.org via Gcc-bugs
/work/gcc-12.0.0_pre/libstdc++-v3/src/c++17/floating_to_chars.cc
-o floating_to_chars.o
In file included from
/tmp/portage/cross-msp430-elf/gcc-12.0.0_pre/work/gcc-12.0.0_pre/libstdc++-v3/src/c++17/floating_to_chars.cc:107:
/tmp/portage/cross-msp430-elf/gcc-12.0.0_pre/work/gcc-12.0.0_pre/libstdc++-v3/src/c++17/ryu/d2fixed_full_table.h:1283:23:
error: size of array 'POW10_SPLIT_2' exceeds maximum object size '32767'
 1283 | static const uint64_t POW10_SPLIT_2[3133][3] = {
  |   ^
In file included from
/tmp/portage/cross-msp430-elf/gcc-12.0.0_pre/work/gcc-12.0.0_pre/libstdc++-v3/src/c++17/floating_to_chars.cc:110:
/tmp/portage/cross-msp430-elf/gcc-12.0.0_pre/work/gcc-12.0.0_pre/libstdc++-v3/src/c++17/ryu/d2fixed.c:
In function 'int {anonymous}::ryu::d2fixed_buffered_n(double, uint32_t,
char*)':
/tmp/portage/cross-msp430-elf/gcc-12.0.0_pre/work/gcc-12.0.0_pre/libstdc++-v3/src/c++17/ryu/d2fixed.c:425:50:
error: 'POW10_SPLIT_2' was not declared in this scope; did you mean
'POW10_SPLIT'?
  425 |   uint32_t digits = mulShift_mod1e9(m2 << 8, POW10_SPLIT_2[p], j +
8);
  |  ^
  |  POW10_SPLIT
/tmp/portage/cross-msp430-elf/gcc-12.0.0_pre/work/gcc-12.0.0_pre/libstdc++-v3/src/c++17/ryu/d2fixed.c:
In function 'int {anonymous}::ryu::d2exp_buffered_n(double, uint32_t, char*,
int*)':
/tmp/portage/cross-msp430-elf/gcc-12.0.0_pre/work/gcc-12.0.0_pre/libstdc++-v3/src/c++17/ryu/d2fixed.c:601:78:
error: 'POW10_SPLIT_2' was not declared in this scope; did you mean
'POW10_SPLIT'?
  601 |   digits = (p >= POW10_OFFSET_2[idx + 1]) ? 0 : mulShift_mod1e9(m2
<< 8, POW10_SPLIT_2[p], j + 8);
  |
 ^
  |
 POW10_SPLIT

Configured as:

$ LANG=C ./gcc/xgcc -Bgcc -v
Reading specs from gcc/specs
COLLECT_GCC=./gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: msp430-elf
Configured with:
/tmp/portage/cross-msp430-elf/gcc-12.0.0_pre/work/gcc-12.0.0_pre/configure
--host=x86_64-pc-linux-gnu --target=msp430-elf --build=x86_64-pc-linux-gnu
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/msp430-elf/gcc-bin/12.0.0
--includedir=/usr/lib/gcc/msp430-elf/12.0.0/include
--datadir=/usr/share/gcc-data/msp430-elf/12.0.0
--mandir=/usr/share/gcc-data/msp430-elf/12.0.0/man
--infodir=/usr/share/gcc-data/msp430-elf/12.0.0/info
--with-gxx-include-dir=/usr/lib/gcc/msp430-elf/12.0.0/include/g++-v12
--with-python-dir=/share/gcc-data/msp430-elf/12.0.0/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror
--with-system-zlib --enable-nls --without-included-gettext
--enable-checking=release --with-bugurl=https://bugs.gentoo.org/
--with-pkgversion='Gentoo 12.0.0_pre p1, commit
d8d291f3367230fdfdacc9868b0aa01de1dabb13' --disable-esp --enable-libstdcxx-time
--enable-poison-system-directories --disable-libstdcxx-time
--with-sysroot=/usr/msp430-elf --disable-bootstrap --with-newlib
--enable-multilib --disable-fixed-point --disable-libgomp --disable-libssp
--disable-libada --disable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --with-zstd --enable-lto --without-isl
--disable-libsanitizer --enable-default-pie --enable-default-ssp
Thread model: single
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20210430 (experimental) (Gentoo 12.0.0_pre p1, commit
d8d291f3367230fdfdacc9868b0aa01de1dabb13)

[Bug target/92729] [avr] Convert the backend to MODE_CC so it can be kept in future releases

2021-04-30 Thread abebeos at lazaridis dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92729

--- Comment #52 from abebeos at lazaridis dot com ---
All good, found it:

https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3ba781d3b5c8efadb60866c9743b657e8f0eb222

[Bug target/92729] [avr] Convert the backend to MODE_CC so it can be kept in future releases

2021-04-30 Thread abebeos at lazaridis dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92729

--- Comment #51 from abebeos at lazaridis dot com ---
@Senthil, can you please provide the links to the commits? I was unable to
locate them.

[Bug target/92729] [avr] Convert the backend to MODE_CC so it can be kept in future releases

2021-04-30 Thread abebeos at lazaridis dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92729

--- Comment #50 from abebeos at lazaridis dot com ---
Great!

It looks that bountysource does not allow to split a bounty.

Any suggestions on how to process this further?

[Bug c/100360] New: scalar operation fails the compilation

2021-04-30 Thread aliaga at uji dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100360

Bug ID: 100360
   Summary: scalar operation fails the compilation
   Product: gcc
   Version: 9.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aliaga at uji dot es
  Target Milestone: ---

Created attachment 50720
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50720=edit
Simple C file

Hi,

Really short code generates a internal error.

This is the code,
==
 #include 
 #include 


  void main(){
  double q = 1.0 / 16.0;

  printf ("%f\n", q);

  }
==

The attachment contains the execution of the next command:
  gcc -v -save-temps error.c -o error.x 2> bug.txt

Best regards,

  José I. Aliaga

[Bug middle-end/95014] gcc fails to merge two identical returns

2021-04-30 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95014

Ivan Sorokin  changed:

   What|Removed |Added

 CC||vanyacpp at gmail dot com

--- Comment #1 from Ivan Sorokin  ---
I think this might be a duplicate of 82689.

[Bug c++/100344] [12 Regression] compiler ICE internal compiler error: in build_call_a, at cp/call.c:38

2021-04-30 Thread unlvsur at live dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100344

--- Comment #10 from cqwrteur  ---
(In reply to Marek Polacek from comment #9)
> Confirmed, started with r12-295.

thank you

[Bug rtl-optimization/100230] ASan: alloc-dealloc-mismatch in early-remat.c

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100230

--- Comment #4 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Alex Coplan
:

https://gcc.gnu.org/g:991ac2d157e8612c02beaa59778ffabd88f484a7

commit r11-8336-g991ac2d157e8612c02beaa59778ffabd88f484a7
Author: Alex Coplan 
Date:   Fri Apr 23 14:09:15 2021 +0100

early-remat.c: Fix new/delete mismatch [PR100230]

This simple patch fixes a mistmatched operator new/delete in
early-remat.c which triggers ASan errors on (at least) AArch64 when
compiling SVE code.

gcc/ChangeLog:

PR rtl-optimization/100230
* early-remat.c (early_remat::sort_candidates): Use delete[]
instead of delete for array allocated with new[].

(cherry picked from commit 5d87c2251c441f056e0a44f928ffcb8a8a679b6b)

[Bug tree-optimization/94589] Optimize (i<=>0)>0 to i>0

2021-04-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94589

Jakub Jelinek  changed:

   What|Removed |Added

  Attachment #50710|0   |1
is obsolete||

--- Comment #18 from Jakub Jelinek  ---
Created attachment 50719
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50719=edit
gcc12-pr94589-wip.patch

Updated patch.  This already does the optimizations, though needs testcase
coverage and perhaps something better for debug uses of the PHI_RESULT besides
the single non-debug use.
And, it won't work together with the above mentioned forwprop patch, I'm afraid
it would need to virtually undo that change but it would be hard.

[Bug c/100353] [11/12 Regression] Accepts invalid label

2021-04-30 Thread jsm28 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100353

Joseph S. Myers  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|UNCONFIRMED |RESOLVED

--- Comment #2 from Joseph S. Myers  ---
C2x feature, not a bug.

[Bug target/92729] [avr] Convert the backend to MODE_CC so it can be kept in future releases

2021-04-30 Thread saaadhu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92729

Senthil Kumar Selvaraj  changed:

   What|Removed |Added

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

--- Comment #49 from Senthil Kumar Selvaraj  ---
Both the above patches (rebased against latest master) are now committed.

See https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568658.html and
https://gcc.gnu.org/pipermail/gcc-patches/2021-April/569253.html.

There's more work to be done to improve code gen (as described in
https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563638.html), and I
intend to work on those items in my spare time.

[Bug fortran/86206] ICE in gfc_resolve_forall, at fortran/resolve.c:9989

2021-04-30 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86206

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to Jürgen Reuter from comment #4)
> Still present in v12.0.

First, I recognize that the submitted code is likely a severely reduced
testcase to demonstrate the bug.

Because FORALL is now listed as an obsolescent feature, I predict that this bug
will never be fixed unless someone who is keenly interested in FORALL steps up.

The issue is in resolve.c(gfc_resolve_forall) where static variables are used
to track nested FORALL statements.  The nesting is assumed to be of the form:

   pure function zero_matrix(xx) result(ret)
 real , intent(in) :: xx(:,:)
 real :: ret(size(xx,1),size(xx,2))
 integer :: i,j
 forall (i=1:size(xx,1),j=1:size(xx,2)) ret(i,j) = 0
   end function zero_matrix

or maybe

   pure function zeroing(xx) result(ret)
  real , intent(in) :: xx(:,:)
  real :: ret(size(xx,1),size(xx,2))
  integer :: i,j
  a: forall (j=1:size(xx,2))
 b: forall (i=1:size(xx,1))
ret(i,j) = 0
 end forall b
  end forall a
   end function zeroing

Here, the I and J variables are tracked, where gfc_resolve_forall()
is called recursively.

I'm guessing that the single line nature of your zero_mat() function
does not properly reset the static variables.  This would look like

 a: forall (j=1:size(xx,2))
 b: forall (i=1:size(xx,1))
ret(i,j) = 0
 end forall a
 or

 a: forall (j=1:size(xx,2))
 b: forall (i=1:size(xx,1))
ret(i,j) = 0
 end forall b

with a missing closing END FORALL.  gfortran, of course, catches the
missing END FORALL because it is not parsing in the single-line FORALL
mode.

[Bug bootstrap/100350] [12 Regression] x86-64→PowerPC bootstrap fails since r12-228: error: '__LIBGCC_KF_MIN__' undeclared in expansion of macro 'RMIN'

2021-04-30 Thread burnus at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100350

--- Comment #3 from Tobias Burnus  ---
The master branch has been updated by Michael Meissner :

https://gcc.gnu.org/g:d9398dd2902a0142fa3b493cf61a340f1f5ab46f

commit r12-325-gd9398dd2902a0142fa3b493cf61a340f1f5ab46f
Author: Michael Meissner 
Date:   Fri Apr 30 12:32:08 2021 -0400

Define target hook to emit KFmode constants for libgcc.

This patch defines a target hook so that the KFmode constants
(__LIBGCC_KF_MAX__, __LIBGCC_KF_MIN__, and __LIBGCC_KF_EPSILON__) needed to
build _divkc3.c in libgcc are defined.  The need for these constants were
added
in the April 28th changes to libgcc that added complex division
optimizations.

We only define the KFmode constants if IEEE 128-bit floating point is
supported, but long double does not use the IEEE 128-bit format.  If long
double uses the IEEE 128-bit format, it will use TFmode and not KFmode.

gcc/
2021-04-30  Michael Meissner  

PR bootstrap/100327
* config/rs6000/rs6000.c
(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define.
(rs6000_libgcc_floating_mode_supported_p): New target hook.

[Bug bootstrap/100327] [12 regression] bootstrap failure after r12-228

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100327

--- Comment #9 from CVS Commits  ---
The master branch has been updated by Michael Meissner :

https://gcc.gnu.org/g:d9398dd2902a0142fa3b493cf61a340f1f5ab46f

commit r12-325-gd9398dd2902a0142fa3b493cf61a340f1f5ab46f
Author: Michael Meissner 
Date:   Fri Apr 30 12:32:08 2021 -0400

Define target hook to emit KFmode constants for libgcc.

This patch defines a target hook so that the KFmode constants
(__LIBGCC_KF_MAX__, __LIBGCC_KF_MIN__, and __LIBGCC_KF_EPSILON__) needed to
build _divkc3.c in libgcc are defined.  The need for these constants were
added
in the April 28th changes to libgcc that added complex division
optimizations.

We only define the KFmode constants if IEEE 128-bit floating point is
supported, but long double does not use the IEEE 128-bit format.  If long
double uses the IEEE 128-bit format, it will use TFmode and not KFmode.

gcc/
2021-04-30  Michael Meissner  

PR bootstrap/100327
* config/rs6000/rs6000.c
(TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define.
(rs6000_libgcc_floating_mode_supported_p): New target hook.

[Bug tree-optimization/100359] New: missed optimization for dead code elimination at -O3 (vs. -O2)

2021-04-30 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100359

Bug ID: 100359
   Summary: missed optimization for dead code elimination at -O3
(vs. -O2)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

This seems to be a very recent regression as it does not reproduce for GCC 11.1
(and earlier).  

[524] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210430 (experimental) [master revision
4cf3b10f27b:939d67a66c9:c111f6066043d3b7bc4141ca0411eae9294aa6c5] (GCC) 
[525] % 
[525] % gcctk -O2 -S -o O2.s small.c
[526] % gcctk -O3 -S -o O3.s small.c
[527] % 
[527] % wc O2.s O3.s
  37   83  635 O2.s
  49  109  808 O3.s
  86  192 1443 total
[528] % 
[528] % grep foo O2.s
[529] % grep foo O3.s
callfoo
[530] % 
[530] % cat small.c
extern void foo(void);
static int b, f, *a = 
int **c = 
static void d() {
  int g, h;
  for (f = 0; f < 1; f++) {
int *i = 
{
  int *j[3], **k = 
  for (g = 0; g < 3; g++)
for (h = 0; h < 1; h++)
  j[g] = 
  *k = j[0];
}
*c = i;
  }
}
int main() {
  d();
  *a = 0;
  if (**c)
foo();
  return 0;
}

[Bug c++/100344] [12 Regression] compiler ICE internal compiler error: in build_call_a, at cp/call.c:38

2021-04-30 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100344

Patrick Palka  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ppalka at gcc dot 
gnu.org

[Bug c++/100344] [12 Regression] compiler ICE internal compiler error: in build_call_a, at cp/call.c:38

2021-04-30 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100344

Marek Polacek  changed:

   What|Removed |Added

   Target Milestone|--- |12.0
   Keywords|needs-reduction |ice-on-valid-code
   Last reconfirmed|2021-04-29 00:00:00 |2021-04-30
 Status|UNCONFIRMED |NEW
Summary|compiler ICE internal   |[12 Regression] compiler
   |compiler error: in  |ICE internal compiler
   |build_call_a, at|error: in build_call_a, at
   |cp/call.c:38|cp/call.c:38
   Priority|P3  |P1
 Ever confirmed|0   |1

--- Comment #9 from Marek Polacek  ---
Confirmed, started with r12-295.

[Bug c++/100344] compiler ICE internal compiler error: in build_call_a, at cp/call.c:38

2021-04-30 Thread unlvsur at live dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100344

--- Comment #8 from cqwrteur  ---
I think this relates to the changes jicama did yesterday. Maybe he can help us
fix it?

[Bug libstdc++/60497] unique_ptr tries to complete its type T even though it's not required to be a complete type

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60497

--- Comment #14 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:47915ef8477569b2fbd8001996aa4e542284bb24

commit r12-320-g47915ef8477569b2fbd8001996aa4e542284bb24
Author: Jonathan Wakely 
Date:   Fri Apr 30 14:45:42 2021 +0100

libstdc++: Use std::addressof to avoid ADL for operator& [PR 60497]

This is another small step towards avoiding the problems described in PR
60497, by using std::addressof to avoid ADL, so that we don't require
all template arguments to be complete.

libstdc++-v3/ChangeLog:

PR libstdc++/60497
* include/bits/basic_ios.tcc (basic_ios::copyfmt): use
std::addressof.
* include/bits/basic_string.tcc (basic_string::swap)
(basic_string::assign): Likewise.
* include/bits/deque.tcc (deque::operator=(const deque&)):
Likewise.
* include/bits/stl_tree.h (_Rb_tree::operator=(const * _Rb_tree&)):
Likewise.
* include/bits/vector.tcc (vector::operator=(const vector&)):
Likewise.

[Bug c++/100344] compiler ICE internal compiler error: in build_call_a, at cp/call.c:38

2021-04-30 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100344

--- Comment #7 from David Binderman  ---
Reduced C++ code seems to be:

template  struct integral_constant {
  static constexpr int value = __v;
};
template  constexpr long find_index() { return 1; }
template 
using find_index_checked = integral_constant()>;
template  class Trans_NS_mpark_variant {};
template  void get(Trans_NS_mpark_variant);
template  void get(Trans_NS_mpark_variant v) {
  get::value>(v);
}
void TestBody() {
  Trans_NS_mpark_variant w;
  get(w);
}

[Bug tree-optimization/94092] Code size and performance degradations after -ftree-loop-distribute-patterns was enabled at -O[2s]+

2021-04-30 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94092

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at gcc dot gnu.org

--- Comment #14 from Jeffrey A. Law  ---
WRT Jim's comment about alignments in c#6.

Right now a pointer's alignment is really only used to eliminate unnecessary
masking -- we don't propagate a pointer's known alignment to improve the known
alignment of memory operations involving that pointer.

This is something I'd cobbled together for a closely related issue which will
try to increase the known alignment of a MEM by using the alignment of a
pointer to that MEM.

We've gone a slightly different (and more effective) route for that internal
issue, but this may still be worth polishing a bit and submitting.

diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 972512e81..be9ff76b5 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -859,6 +859,28 @@ gen_rtx_MEM (machine_mode mode, rtx addr)
  we clear it here.  */
   MEM_ATTRS (rt) = 0;

+  /* If we can deduce a higher alignment for the memory access
+ based on the pointer, then it's advantageous to do so.   */
+  unsigned int align = 0;
+  if (REG_P (addr)
+  && REG_POINTER (addr))
+align = REGNO_POINTER_ALIGN (REGNO (addr));
+  else if (GET_CODE (addr) == PLUS
+  && REG_P (XEXP (addr, 0))
+  && REG_POINTER (XEXP (addr, 0))
+  && REGNO_POINTER_ALIGN (REGNO (XEXP (addr, 0)))
+  && GET_CODE (XEXP (addr, 1)) == CONST_INT)
+{
+  unsigned int tmp = 1 << (ffs_hwi (INTVAL (XEXP (addr, 1))) - 1);
+  /* ALIGN is in bits.  */
+  tmp <<= 3;
+  align = REGNO_POINTER_ALIGN (REGNO (XEXP (addr, 0)));
+  align = (align > tmp) ? tmp : align;
+}
+
+  if (align > mode_mem_attrs[(int) mode]->align)
+set_mem_align (rt, align);
+
   return rt;
 }

[Bug tree-optimization/100349] [11/12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (under -O2 to -Os)

2021-04-30 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100349

--- Comment #2 from Aldy Hernandez  ---
evolution_part_in_loop_num() is returning NULL when evrp asks about the PHI
result here:

(gdb) p debug(stmt)
c.1_4 = PHI 

Is this expected?

If it is, we could easily return false if step is null and everything should
just work.

[Bug target/100305] [10 Regression] aarch64: ICE in output_operand_lossage with -O3

2021-04-30 Thread rsandifo at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100305

--- Comment #14 from rsandifo at gcc dot gnu.org  
---
(In reply to Gilles Gouaillardet from comment #13)
> Thanks Richard for the quick fix.
> 
> I am happy to confirm that the latest trunk passes the three reproducers
> included in this ticket.
> 
> However, the latest gcc-11 branch only passes the mini reproducer you posted
> (and crashes with a similar stack trace with Andrew's reproducer and the one
> I trimmed from GROMACS)
Hmm, those also pass for me on the branch (after
g:cd0a059bd384da58d43674496a79ecb7de610800).  However, it's certainly
possible that some of the other patterns have a similar bug.  I'll try
a few variations to see if I can reproduce.

[Bug c++/100358] Not all filesystems support posix_fallocate() (e.g. ZFS)

2021-04-30 Thread andy at omnios dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100358

--- Comment #1 from andy at omnios dot org ---
From
https://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_fallocate.html

[EINVAL]
The len argument is less than zero, or the offset argument is less than
zero, or the underlying file system does not support this operation.

[Bug libstdc++/60497] unique_ptr tries to complete its type T even though it's not required to be a complete type

2021-04-30 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60497

--- Comment #13 from Jonathan Wakely  ---
(In reply to Jonathan Wakely from comment #9)
> The self-assignment test in std::vector uses &__rhs which does ADL and tries
> to complete A.

Even if the &__rhs is changed to std::addressof(__rhs) it fails. Lookup for the
equality operator of std::allocator also tries to complete A.

> Fixing this everywhere might take some time.

I think it's impossible.

[Bug libstdc++/80675] Incorrect implementation of LWG 2534

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80675

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:aa475c4ac80733f85ba47b109fc1900f05e810e2

commit r12-319-gaa475c4ac80733f85ba47b109fc1900f05e810e2
Author: Jonathan Wakely 
Date:   Fri Apr 30 14:07:28 2021 +0100

libstdc++: Implement LWG 1203 for rvalue iostreams

This implements the resolution of LWG 1203 so that the constraints for
rvalue stream insertion/extraction are simpler, and the return type is
the original rvalue stream type not its base class.

Signed-off-by: Jonathan Wakely 

libstdc++-v3/ChangeLog:

* include/std/istream (operator>>(Istream&&, x&)): Simplify, as
per LWG 1203.
* include/std/ostream (operator<<(Ostream&&, const x&)):
Likewise.
*
testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
Adjust dg-error pattern.
*
testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
Likewise.
* testsuite/27_io/basic_istream/extractors_other/char/4.cc: Define
is_extractable trait to replace std::__is_extractable. Make it
work with rvalue streams as well as lvalues, to replace f() and
g() helper functions.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
Define is_insertable trait to replace std::__is_insertable. Make
it work with rvalue streams as well as lvalues, to replace f()
and g() helper functions.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
Likewise.
* testsuite/27_io/filesystem/path/io/dr2989.cc: Prune additional
errors from new constraints.
* testsuite/27_io/rvalue_streams-2.cc: Remove PR 80675 checks,
which are no longer expected to compile.
* testsuite/27_io/rvalue_streams.cc: Adjust existing test.
Verify LWG 1203 changes.

[Bug libstdc++/100285] experimental/net/socket/socket_base.cc fails on arm-eabi (r12-137)

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100285

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:0d501c338548152f9d2728d383eec3e9cef16784

commit r12-318-g0d501c338548152f9d2728d383eec3e9cef16784
Author: Jonathan Wakely 
Date:   Fri Apr 30 14:25:25 2021 +0100

libstdc++: Use  features conditionally [PR 100285]

This makes the uses of getsockopt and setsockopt in
 conditional on the availability of .

It also fixes a test to check for  instead of .

libstdc++-v3/ChangeLog:

PR libstdc++/100285
* include/experimental/socket (__basic_socket_impl::set_option)
(__basic_socket_impl::get_option) [!_GLIBCXX_HAVE_SYS_SOCKET_H]:
Just set error code.
* testsuite/experimental/net/socket/socket_base.cc: CHeck
for  not .

[Bug libstdc++/100351] experimental/net/internet/tcp.cc fails on arm-eabi

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100351

--- Comment #1 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:57028ff2d3f56deec25498f83e99c39478acc02f

commit r12-317-g57028ff2d3f56deec25498f83e99c39478acc02f
Author: Jonathan Wakely 
Date:   Fri Apr 30 11:45:07 2021 +0100

libstdc++: Define effective-target for net::ip features [PR 100351]

Define a new effective-target keyword so that tests for the Networking
TS  header can be skipped on targets where none
of it can be usefully defined.

libstdc++-v3/ChangeLog:

PR libstdc++/100180
PR libstdc++/100286
PR libstdc++/100351
* testsuite/experimental/net/internet/address/v4/comparisons.cc:
Use new effective-target keyword.
* testsuite/experimental/net/internet/address/v4/cons.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/creation.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/members.cc:
Likewise.
* testsuite/experimental/net/internet/address/v6/members.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/base.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc:
Likewise.
* testsuite/experimental/net/internet/socket/opt.cc:
Likewise.
* testsuite/experimental/net/internet/tcp.cc:
Likewise.
* testsuite/experimental/net/internet/udp.cc:
Likewise.
* testsuite/lib/libstdc++.exp (check_effective_target_net_ts_ip):
New proc to check net_ts_ip et.

[Bug libstdc++/100180] experimental/net/internet/address/v6/members.cc fails on arm-eabi

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100180

--- Comment #9 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:57028ff2d3f56deec25498f83e99c39478acc02f

commit r12-317-g57028ff2d3f56deec25498f83e99c39478acc02f
Author: Jonathan Wakely 
Date:   Fri Apr 30 11:45:07 2021 +0100

libstdc++: Define effective-target for net::ip features [PR 100351]

Define a new effective-target keyword so that tests for the Networking
TS  header can be skipped on targets where none
of it can be usefully defined.

libstdc++-v3/ChangeLog:

PR libstdc++/100180
PR libstdc++/100286
PR libstdc++/100351
* testsuite/experimental/net/internet/address/v4/comparisons.cc:
Use new effective-target keyword.
* testsuite/experimental/net/internet/address/v4/cons.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/creation.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/members.cc:
Likewise.
* testsuite/experimental/net/internet/address/v6/members.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/base.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc:
Likewise.
* testsuite/experimental/net/internet/socket/opt.cc:
Likewise.
* testsuite/experimental/net/internet/tcp.cc:
Likewise.
* testsuite/experimental/net/internet/udp.cc:
Likewise.
* testsuite/lib/libstdc++.exp (check_effective_target_net_ts_ip):
New proc to check net_ts_ip et.

[Bug libstdc++/100286] experimental/net/internet/socket/opt.cc fails on arm-eabi (r12-137)

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100286

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:57028ff2d3f56deec25498f83e99c39478acc02f

commit r12-317-g57028ff2d3f56deec25498f83e99c39478acc02f
Author: Jonathan Wakely 
Date:   Fri Apr 30 11:45:07 2021 +0100

libstdc++: Define effective-target for net::ip features [PR 100351]

Define a new effective-target keyword so that tests for the Networking
TS  header can be skipped on targets where none
of it can be usefully defined.

libstdc++-v3/ChangeLog:

PR libstdc++/100180
PR libstdc++/100286
PR libstdc++/100351
* testsuite/experimental/net/internet/address/v4/comparisons.cc:
Use new effective-target keyword.
* testsuite/experimental/net/internet/address/v4/cons.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/creation.cc:
Likewise.
* testsuite/experimental/net/internet/address/v4/members.cc:
Likewise.
* testsuite/experimental/net/internet/address/v6/members.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/base.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc:
Likewise.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc:
Likewise.
* testsuite/experimental/net/internet/socket/opt.cc:
Likewise.
* testsuite/experimental/net/internet/tcp.cc:
Likewise.
* testsuite/experimental/net/internet/udp.cc:
Likewise.
* testsuite/lib/libstdc++.exp (check_effective_target_net_ts_ip):
New proc to check net_ts_ip et.

[Bug c++/100344] compiler ICE internal compiler error: in build_call_a, at cp/call.c:38

2021-04-30 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100344

--- Comment #6 from David Binderman  ---
The bug first seems to occur sometime between git hash 
b58dc0b803057c0e, dated 20210429, and 17f2908fcf058e14, dated
20210430.

I have a poor record with git bisect, so I will leave that 
to someone else more competent.

[Bug fortran/86206] ICE in gfc_resolve_forall, at fortran/resolve.c:9989

2021-04-30 Thread juergen.reuter at desy dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86206

--- Comment #4 from Jürgen Reuter  ---
Still present in v12.0.

[Bug fortran/59881] Memory corruption with allocatable arrays in polymorphic types

2021-04-30 Thread juergen.reuter at desy dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59881

--- Comment #5 from Jürgen Reuter  ---
I checked again, and I don't see any issues any more. There might still be some
memory leaks, I haven't checked. Would it make sense to close this one and open
a new report in case there is a definite reproducer?

[Bug c/100353] [11/12 Regression] Accepts invalid label

2021-04-30 Thread harald at gigawatt dot nl via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100353

Harald van Dijk  changed:

   What|Removed |Added

 CC||harald at gigawatt dot nl

--- Comment #1 from Harald van Dijk  ---
This was intentional, this will become valid C so this is now only diagnosed
with -pedantic and only in modes before C2x:
https://gcc.gnu.org/onlinedocs/gcc/Mixed-Labels-and-Declarations.html

[Bug target/100347] [11/12 Regression] GCC 11 does not recognize skylake; translates "march=native" to "x86_64"

2021-04-30 Thread schnetter at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100347

--- Comment #5 from Erik Schnetter  ---
This is my hardware configuration:

$ sysctl -a | grep machdep.cpu
machdep.cpu.address_bits.physical: 39
machdep.cpu.address_bits.virtual: 48
machdep.cpu.arch_perf.events: 0
machdep.cpu.arch_perf.events_number: 7
machdep.cpu.arch_perf.fixed_number: 3
machdep.cpu.arch_perf.fixed_width: 48
machdep.cpu.arch_perf.number: 4
machdep.cpu.arch_perf.version: 4
machdep.cpu.arch_perf.width: 48
machdep.cpu.cache.L2_associativity: 4
machdep.cpu.cache.linesize: 64
machdep.cpu.cache.size: 256
machdep.cpu.mwait.extensions: 3
machdep.cpu.mwait.linesize_max: 64
machdep.cpu.mwait.linesize_min: 64
machdep.cpu.mwait.sub_Cstates: 286531872
machdep.cpu.thermal.ACNT_MCNT: 1
machdep.cpu.thermal.core_power_limits: 1
machdep.cpu.thermal.dynamic_acceleration: 1
machdep.cpu.thermal.energy_policy: 1
machdep.cpu.thermal.fine_grain_clock_mod: 1
machdep.cpu.thermal.hardware_feedback: 0
machdep.cpu.thermal.invariant_APIC_timer: 1
machdep.cpu.thermal.package_thermal_intr: 1
machdep.cpu.thermal.sensor: 1
machdep.cpu.thermal.thresholds: 2
machdep.cpu.tlb.data.small: 64
machdep.cpu.tlb.data.small_level1: 64
machdep.cpu.tlb.inst.large: 8
machdep.cpu.tsc_ccc.denominator: 2
machdep.cpu.tsc_ccc.numerator: 216
machdep.cpu.xsave.extended_state: 31 832 1088 0
machdep.cpu.xsave.extended_state1: 15 832 256 0
machdep.cpu.brand: 0
machdep.cpu.brand_string: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
machdep.cpu.core_count: 6
machdep.cpu.cores_per_package: 8
machdep.cpu.extfamily: 0
machdep.cpu.extfeature_bits: 1241984796928
machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP
TSCI
machdep.cpu.extmodel: 9
machdep.cpu.family: 6
machdep.cpu.feature_bits: 9221960262849657855
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA
CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ
DTES64 MON DSCPL VMX SMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC
MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C
machdep.cpu.leaf7_feature_bits: 43806655 1073741824
machdep.cpu.leaf7_feature_bits_edx: 2617255424
machdep.cpu.leaf7_features: RDWRFSGS TSC_THREAD_OFFSET SGX BMI1 HLE AVX2 SMEP
BMI2 ERMS INVPCID RTM FPU_CSDS MPX RDSEED ADX SMAP CLFSOPT IPT SGXLC MDCLEAR
TSXFA IBRS STIBP L1DF SSBD
machdep.cpu.logical_per_package: 16
machdep.cpu.max_basic: 22
machdep.cpu.max_ext: 2147483656
machdep.cpu.microcode_version: 222
machdep.cpu.model: 158
machdep.cpu.processor_flag: 5
machdep.cpu.signature: 591594
machdep.cpu.stepping: 10
machdep.cpu.thread_count: 12
machdep.cpu.vendor: GenuineIntel

[Bug c++/98358] [8 Regression] new test case g++.dg/template/pr98297.C in r8-10683 fails

2021-04-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98358

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #4 from Jakub Jelinek  ---
Fixed.

[Bug c/100357] unexpected behaviour of attribute noinit

2021-04-30 Thread sebastian.huber--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100357

Sebastian Huber  changed:

   What|Removed |Added

Summary|attribute noinit with   |unexpected behaviour of
   |-fdata-sections unexpected  |attribute noinit
   |behaviour   |

--- Comment #1 from Sebastian Huber  ---
Consider the following test code:

__attribute__(( __noinit__ )) int a;

__attribute__(( __noinit__ )) int b;

On a target with a small data area (e.g. powerpc) this yields:

 powerpc-rtems6-gcc -O2 -S -o - test.c
.file   "test.c"
.machine ppc
.section".text"
.globl B
.globl a
.section.sbss,"aw",@nobits
.align 2
.type   B, @object
.size   B, 4
B:
.zero   4
.type   a, @object
.size   a, 4
a:
.zero   4
.ident  "GCC: (GNU) 10.2.1 20210113 (RTEMS 6, RSB
3d30ecae960152dd5a0e1be55de97dd46486ac53, Newlib 415fdd4)"
.section.note.GNU-stack,"",@progbits

On arm you get the expected result:
arm-rtems6-gcc -O2 -S -o - test.c
.cpu arm7tdmi
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file   "test.c"
.text
.global B
.global a
.section.noinit,"aw"
.align  2
.type   B, %object
.size   B, 4
B:
.space  4
.type   a, %object
.size   a, 4
a:
.space  4
.ident  "GCC: (GNU) 10.2.1 20210113 (RTEMS 6, RSB
3d30ecae960152dd5a0e1be55de97dd46486ac53, Newlib 415fdd4)"

However, with -fdata-sections you get:

arm-rtems6-gcc -O2 -S -o - test.c -fdata-sections
.cpu arm7tdmi
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 34, 0
.eabi_attribute 18, 4
.file   "test.c"
.text
.global B
.global a
.section.bss.B,"aw",%nobits
.align  2
.type   B, %object
.size   B, 4
B:
.space  4
.section.bss.a,"aw",%nobits
.align  2
.type   a, %object
.size   a, 4
a:
.space  4
.ident  "GCC: (GNU) 10.2.1 20210113 (RTEMS 6, RSB
3d30ecae960152dd5a0e1be55de97dd46486ac53, Newlib 415fdd4)"

[Bug c++/98358] [8 Regression] new test case g++.dg/template/pr98297.C in r8-10683 fails

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98358

--- Comment #3 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
:

https://gcc.gnu.org/g:e22ffa06aa2a996e5967c831d319894be4fdaffa

commit r8-10934-ge22ffa06aa2a996e5967c831d319894be4fdaffa
Author: Jakub Jelinek 
Date:   Fri Apr 30 15:17:31 2021 +0200

testsuite: Adjust expected error in a testcase [PR98358]

On Fri, Apr 23, 2021 at 05:24:00PM -0400, Jason Merrill via Gcc wrote:
> > We have one P1 bug though - P98358 - it is unclear if just changing the
> > testcase is all that is needed or if some C++ FE changes are needed.
>
> The error message quoted in the PR looks correct, so I think changing
> the testcase is sufficient.

2021-04-30  Jakub Jelinek  

PR c++/98358
* g++.dg/template/pr98297.C: Expect error about shadowing template
template
parameter rather than does not declare anything error.

[Bug c++/100358] New: Not all filesystems support posix_fallocate() (e.g. ZFS)

2021-04-30 Thread andy at omnios dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100358

Bug ID: 100358
   Summary: Not all filesystems support posix_fallocate() (e.g.
ZFS)
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: andy at omnios dot org
  Target Milestone: ---

I've been troubleshooting a raft of testsuite failures with gcc 11.1 on OmniOS
(an illumos distribution, using Target: x86_64-pc-solaris2.11).

For example:

dir-only-3.C:10:2: internal compiler error: Segmentation Fault
Please submit a full bug report,
with preprocessed source if appropriate.

> $G
C++ symbol demangling enabled
> $C
fc7fffdf2b90 libc.so.1`memcpy+0x554()
fc7fffdf2bd0 elf_out::end+0x102()
fc7fffdf2ca0 finish_module_processing+0x4cf()
fc7fffdf2d70 c_parse_final_cleanups+0x78c()
fc7fffdf2d90 compile_file+0x24()
fc7fffdf2e50 toplev::main+0x7e9()
fc7fffdf2e80 main+0x31()
fc7fffdf2eb0 _start_crt+0x87()
fc7fffdf2ec0 _start+0x18()


This turns out to be due to the use of posix_fallocate() in gcc/cp/module.cc -
elf_out::create_mapping()

Although illumos supports the posix_fallocate() function, I am running gcc to
compile files on a ZFS filesystem, and that filesystem does not support this.
Swapping back to ftruncate() resolves the problem, and I suggest that if
posix_fallocate() fails with EINVAL, the code should then try ftruncate().

[Bug c++/100344] compiler ICE internal compiler error: in build_call_a, at cp/call.c:38

2021-04-30 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100344

David Binderman  changed:

   What|Removed |Added

 CC||dcb314 at hotmail dot com

--- Comment #5 from David Binderman  ---
Created attachment 50718
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50718=edit
gzipped C++ source code

I see a similar error. Preprocessed C++ source code attached.

I will reduce the code, using cvise.

[Bug c/100357] New: attribute noinit with -fdata-sections unexpected behaviour

2021-04-30 Thread sebastian.huber--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100357

Bug ID: 100357
   Summary: attribute noinit with -fdata-sections unexpected
behaviour
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sebastian.hu...@embedded-brains.de
  Target Milestone: ---

Consider the following test code:

[Bug libstdc++/100180] experimental/net/internet/address/v6/members.cc fails on arm-eabi

2021-04-30 Thread clyon at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100180

--- Comment #8 from Christophe Lyon  ---
On trunk I'm still seeing:
In file included from
/libstdc++-v3/testsuite/experimental/net/internet/address/v6/members.cc:21:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
In function 'std::experimental::net::v1::ip::address_v4
std::experimental::net::v1::ip::make_address_v4(std::experimental::fundamentals_v1::string_view,
std::error_code&)':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:708:
error: 'INET_ADDRSTRLEN' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:709:
error: '__buf' was not declared in this scope; did you mean '__sbuf'?
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
At global scope:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1548:
error: 'sockaddr_in' does not name a type
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1549:
error: 'sockaddr_in6' does not name a type
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
In member function 'constexpr std::size_t
std::experimental::net::v1::ip::basic_endpoint<_InternetProtocol>::size()
const':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1534:
error: 'sockaddr_in6' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1534:
error: 'sockaddr_in' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
In member function 'constexpr bool
std::experimental::net::v1::ip::basic_endpoint<_InternetProtocol>::_M_is_v6()
const':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1553:
error: 'AF_INET6' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
At global scope:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1683:
error: 'AI_PASSIVE' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1684:
error: 'AI_CANONNAME' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1685:
error: 'AI_NUMERICHOST' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1689:
error: 'AI_V4MAPPED' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1690:
error: 'AI_ALL' was not declared in this scope; did you mean 'LC_ALL'?
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1691:
error: 'AI_ADDRCONFIG' was not declared in this scope


(as of r12-239)

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #16 from Richard Biener  ---
Fixed. (the fix cherry-pick is attributed to the duplicate bug)

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

--- Comment #15 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:9362939b827528becec1fcc5bc1d8c856a03f558

commit r8-10933-g9362939b827528becec1fcc5bc1d8c856a03f558
Author: Richard Biener 
Date:   Fri Apr 30 14:14:48 2021 +0200

c++/98032 - add testcase

This adds another testcase for PR95719.

2021-04-30  Richard Biener  

PR c++/98032
* g++.dg/pr98032.C: New testcase.

(cherry picked from commit dfc70841eb0ca42637826177f329cf6c98ee00ad)

[Bug c++/95719] [10/11 Regression] ICE in lookup_vfn_in_binfo at gcc/cp/class.c:2459 since r11-954-g0ddb93ce77374004

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95719

--- Comment #10 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:4ccd63f07dc85911e4c76b350cdc19daeee7284a

commit r8-10932-g4ccd63f07dc85911e4c76b350cdc19daeee7284a
Author: Jason Merrill 
Date:   Tue Jun 23 21:25:21 2020 -0400

c++: Fix ICE with using and virtual function. [PR95719]

conversion_path points to the base where we found the using-declaration,
not
where the function is actually a member; look up the actual base.  And then
maybe look back to the derived class if the base is primary.

gcc/cp/ChangeLog:

PR c++/95719
* call.c (build_over_call): Look up the overrider in base_binfo.
* class.c (lookup_vfn_in_binfo): Look through BINFO_PRIMARY_P.

gcc/testsuite/ChangeLog:

PR c++/95719
* g++.dg/tree-ssa/final4.C: New test.

(cherry picked from commit 710df943389a854ef00c15ed0ad219b41db236aa)

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

--- Comment #14 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:820dc57c57ef589cfed1b836a4d136c610b8fb25

commit r9-9480-g820dc57c57ef589cfed1b836a4d136c610b8fb25
Author: Richard Biener 
Date:   Fri Apr 30 14:14:48 2021 +0200

c++/98032 - add testcase

This adds another testcase for PR95719.

2021-04-30  Richard Biener  

PR c++/98032
* g++.dg/pr98032.C: New testcase.

(cherry picked from commit dfc70841eb0ca42637826177f329cf6c98ee00ad)

[Bug c++/95719] [10/11 Regression] ICE in lookup_vfn_in_binfo at gcc/cp/class.c:2459 since r11-954-g0ddb93ce77374004

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95719

--- Comment #9 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:710df943389a854ef00c15ed0ad219b41db236aa

commit r9-9479-g710df943389a854ef00c15ed0ad219b41db236aa
Author: Jason Merrill 
Date:   Tue Jun 23 21:25:21 2020 -0400

c++: Fix ICE with using and virtual function. [PR95719]

conversion_path points to the base where we found the using-declaration,
not
where the function is actually a member; look up the actual base.  And then
maybe look back to the derived class if the base is primary.

gcc/cp/ChangeLog:

PR c++/95719
* call.c (build_over_call): Look up the overrider in base_binfo.
* class.c (lookup_vfn_in_binfo): Look through BINFO_PRIMARY_P.

gcc/testsuite/ChangeLog:

PR c++/95719
* g++.dg/tree-ssa/final4.C: New test.

[Bug target/100354] [9/10/11/12 regression] aarch64: non-deligitimized UNSPEC UNSPEC_TLS (76) found in variable location

2021-04-30 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100354

Alex Coplan  changed:

   What|Removed |Added

 Target||aarch64
  Known to fail||10.3.0, 11.1.0, 12.0, 9.3.0
Summary|[9 regression] aarch64: |[9/10/11/12 regression]
   |non-deligitimized UNSPEC|aarch64: non-deligitimized
   |UNSPEC_TLS (76) found in|UNSPEC UNSPEC_TLS (76)
   |variable location   |found in variable location
 CC||acoplan at gcc dot gnu.org
   Last reconfirmed||2021-04-30
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Alex Coplan  ---
Confirmed.

[Bug libstdc++/100286] experimental/net/internet/socket/opt.cc fails on arm-eabi (r12-137)

2021-04-30 Thread clyon at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100286

--- Comment #3 from Christophe Lyon  ---
Not quite, I'm now seeing:
In file included from
/libstdc++-v3/testsuite/experimental/net/internet/socket/opt.cc:3:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
In function 'std::experimental::net::v1::ip::address_v4
std::experimental::net::v1::ip::make_address_v4(std::experimental::fundamentals_v1::string_view,
std::error_code&)':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:708:
error: 'INET_ADDRSTRLEN' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:709:
error: '__buf' was not declared in this scope; did you mean '__sbuf'?
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
At global scope:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1548:
error: 'sockaddr_in' does not name a type
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1549:
error: 'sockaddr_in6' does not name a type
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
In member function 'constexpr std::size_t
std::experimental::net::v1::ip::basic_endpoint<_InternetProtocol>::size()
const':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1534:
error: 'sockaddr_in6' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1534:
error: 'sockaddr_in' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
In member function 'constexpr bool
std::experimental::net::v1::ip::basic_endpoint<_InternetProtocol>::_M_is_v6()
const':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1553:
error: 'AF_INET6' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:
At global scope:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1683:
error: 'AI_PASSIVE' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1684:
error: 'AI_CANONNAME' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1685:
error: 'AI_NUMERICHOST' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1689:
error: 'AI_V4MAPPED' was not declared in this scope
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1690:
error: 'AI_ALL' was not declared in this scope; did you mean 'LC_ALL'?
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/internet:1691:
error: 'AI_ADDRCONFIG' was not declared in this scope

[Bug libstdc++/100285] experimental/net/socket/socket_base.cc fails on arm-eabi (r12-137)

2021-04-30 Thread clyon at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100285

Christophe Lyon  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2021-04-30
 Status|UNCONFIRMED |NEW

--- Comment #3 from Christophe Lyon  ---
Not quite, I'm now seeing:
In file included from
/libstdc++-v3/testsuite/experimental/net/socket/socket_base.cc:20:
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/socket:
In member function 'void
std::experimental::net::v1::__basic_socket_impl<_Protocol>::set_option(const
_SettableSocketOption&, std::error_code&)':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/socket:625:
error: '::setsockopt' has not been declared
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/socket:
In member function 'void
std::experimental::net::v1::__basic_socket_impl<_Protocol>::get_option(_GettableSocketOption&,
std::error_code&) const':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/socket:639:
error: '::getsockopt' has not been declared; did you mean 'getsubopt'?
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/socket:
In member function 'void
std::experimental::net::v1::__basic_socket_impl<_Protocol>::_M_close()':
/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-arm-none-eabi/gcc3/arm-none-eabi/libstdc++-v3/include/experimental/socket:709:
error: 'linger' is not a member of 'std::experimental::net::v1::socket_base'
[]

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

--- Comment #13 from Richard Biener  ---
(In reply to Richard Biener from comment #7)
> The 10 branch has
> 
>   while (BINFO_PRIMARY_P (binfo))
> /* BINFO_VIRTUALS in a primary base isn't accurate, find the derived
>class that actually owns the vtable.  */
> binfo = BINFO_INHERITANCE_CHAIN (binfo);
> 
> in lookup_vfn_in_binfo and that would apply here.  Was added with
> g:554eb7d2e1ef5660d6a8e1c12ee1d751a70bbf31 for PR95719.

The testcase from that rev doesn't ICE on the 8/9 branches nor does it pass
its dump scanning.  I'll backport it crippled (dump-scanning removed) and
have added the testcase from this PR.

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

--- Comment #12 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:1e54e82fd49958703234b1023a4c01a9474385fd

commit r10-9783-g1e54e82fd49958703234b1023a4c01a9474385fd
Author: Richard Biener 
Date:   Fri Apr 30 14:14:48 2021 +0200

c++/98032 - add testcase

This adds another testcase for PR95719.

2021-04-30  Richard Biener  

PR c++/98032
* g++.dg/pr98032.C: New testcase.

(cherry picked from commit dfc70841eb0ca42637826177f329cf6c98ee00ad)

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

--- Comment #11 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:88393a07a8df489df2583e77fce8adc9b1db8163

commit r11-8335-g88393a07a8df489df2583e77fce8adc9b1db8163
Author: Richard Biener 
Date:   Fri Apr 30 14:14:48 2021 +0200

c++/98032 - add testcase

This adds another testcase for PR95719.

2021-04-30  Richard Biener  

PR c++/98032
* g++.dg/pr98032.C: New testcase.

(cherry picked from commit dfc70841eb0ca42637826177f329cf6c98ee00ad)

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

--- Comment #10 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:dfc70841eb0ca42637826177f329cf6c98ee00ad

commit r12-315-gdfc70841eb0ca42637826177f329cf6c98ee00ad
Author: Richard Biener 
Date:   Fri Apr 30 14:14:48 2021 +0200

c++/98032 - add testcase

This adds another testcase for PR95719.

2021-04-30  Richard Biener  

PR c++/98032
* g++.dg/pr98032.C: New testcase.

[Bug target/100356] New: gcc.target/aarch64/advsimd-intrinsics tests are run on arm-linux-gnueabi*

2021-04-30 Thread doko at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100356

Bug ID: 100356
   Summary: gcc.target/aarch64/advsimd-intrinsics tests are run on
arm-linux-gnueabi*
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at debian dot org
  Target Milestone: ---

gcc.target/aarch64/advsimd-intrinsics tests are run on arm-linux-gnueabi*. 
It's odd, that these are in an aarch64 subdir, but they are marked as

/* { dg-xfail-if "" { arm*-*-* } } */

All these don't show up as XFAIL, but as UNRESOLVED, because they fail to
build.

[Bug target/100340] Bootstrap fails with Clang 12.0.5 (XCode 12.5)

2021-04-30 Thread juergen.reuter at desy dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340

--- Comment #8 from Jürgen Reuter  ---
(In reply to Iain Sandoe from comment #6)

> 
> 1. (re-)install xcode 12.4 command line tools and select them for use
> 2. disable debug comparison in the bootstrap ( --without-build-config )

Just to report that --without-build-config did successfully compile and
bootstrap.

[Bug testsuite/100355] New: gcc.c-torture/execute/ieee/cdivchkld.c needs fmaxl

2021-04-30 Thread clyon at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100355

Bug ID: 100355
   Summary: gcc.c-torture/execute/ieee/cdivchkld.c needs fmaxl
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: clyon at gcc dot gnu.org
  Target Milestone: ---

The new test gcc.c-torture/execute/ieee/cdivchkld.c needs fmaxl(), which may
not be available, for instance on aarch64-elf with newlib.

aarch64-none-elf/bin/ld: /ccwwkiEw.o: in function `match':
cdivchkld.c:(.text+0x200): undefined reference to `fmaxl'
FAIL: gcc.c-torture/execute/ieee/cdivchkld.c compilation,  -O0 

newlib/libm/common/fmaxl.c contains:
/* On platforms where long double is as wide as double.  */
#ifdef _LDBL_EQ_DBL
long double
fmaxl (long double x, long double y)
{
  return fmax(x, y);
}
#endif

and fmaxl.o is empty on aarch64.

I am not sure how it should be provided when _LDBL_EQ_DBL is not defined?

[Bug target/100354] New: [9 regression] aarch64: non-deligitimized UNSPEC UNSPEC_TLS (76) found in variable location

2021-04-30 Thread nsz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100354

Bug ID: 100354
   Summary: [9 regression] aarch64: non-deligitimized UNSPEC
UNSPEC_TLS (76) found in variable location
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: nsz at gcc dot gnu.org
  Target Milestone: ---

i see this note/warning a lot during an aarch64 glibc build
since gcc-9, it seems to require -O -g, and seems to be
harmless wrt code generation, just annoying.

$ cat bug.c
struct s {
  void *p;
  int n;
};

void foo(struct s *x)
{
  void *p = __builtin_thread_pointer();
  if (x->p != p)
x->p = p;
  x->n++;
}

$ aarch64-none-linux-gnu-gcc -S -O1 -g bug.c
bug.c: In function ‘foo’:
bug.c:6:6: note: non-delegitimized UNSPEC UNSPEC_TLS (76) found in variable
location
6 | void foo(struct s *x)
  |  ^~~


may be related to bug 89006

[Bug c/100353] [11/12 Regression] Accepts invalid label

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100353

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.2
 CC||jsm28 at gcc dot gnu.org
   Keywords||accepts-invalid
Summary|Accepts invalid label   |[11/12 Regression] Accepts
   ||invalid label

[Bug c/100353] New: Accepts invalid label

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100353

Bug ID: 100353
   Summary: Accepts invalid label
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

GCC 11 started to accept

void b()
{
  int d;
e:
  int f;
}

which was previously rejected as

t.c: In function 'b':
t.c:5:3: error: a label can only be part of a statement and a declaration is
not a statement
5 |   int f;
  |   ^~~
t.c:4:1: error: label at end of compound statement
4 | e:
  | ^

and which clang also rejects:

t.c:5:3: error: expected expression
  int f;
  ^
1 error generated.

[Bug tree-optimization/100349] [11/12 Regression] ICE Segmentation fault during GIMPLE pass: evrp (under -O2 to -Os)

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100349

Richard Biener  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 CC||aldyh at gcc dot gnu.org,
   ||amacleod at redhat dot com
   Priority|P3  |P2
   Target Milestone|--- |11.2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-04-30

--- Comment #1 from Richard Biener  ---
Confirmed.  I'll split out the accepts-invalid issue.

[Bug bootstrap/100350] [12 Regression] x86-64→PowerPC bootstrap fails since r12-228: error: '__LIBGCC_KF_MIN__' undeclared in expansion of macro 'RMIN'

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100350

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |12.0
   Priority|P3  |P1
Version|11.0|12.0

[Bug libgomp/100352] libgomp.fortran/async_io_1.f90 -O0 execution test

2021-04-30 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100352

Tom de Vries  changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #5 from Tom de Vries  ---
Tobias, could you take a look?

[Bug libgomp/100352] libgomp.fortran/async_io_1.f90 -O0 execution test

2021-04-30 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100352

--- Comment #4 from Tom de Vries  ---
Going through the lock lifetime using backtraces:
...
(gdb) watch ((pthread_mutex_t *) 0x6059d0)->__data.__lock 
Hardware watchpoint 2: ((pthread_mutex_t *) 0x6059d0)->__data.__lock
...

I. Locked from _gfortran_st_open:
...
(gdb) c
Continuing.
Hardware watchpoint 2: ((pthread_mutex_t *) 0x6059d0)->__data.__lock

Old value = 0
New value = 1
0x76eb6896 in __lll_lock_elision (futex=0x6059d0,
adapt_count=, 
private=0) at ../sysdeps/unix/sysv/linux/x86/elision-lock.c:106
106   return LLL_LOCK ((*futex), private);
(gdb) bt
#0  0x76eb6896 in __lll_lock_elision (futex=0x6059d0,
adapt_count=, 
private=0) at ../sysdeps/unix/sysv/linux/x86/elision-lock.c:106
#1  0x77b64aaf in __gthread_mutex_lock (__mutex=0x6059d0)
at ../libgcc/gthr-default.h:749
#2  0x77b64e47 in insert_unit (n=10)
at /home/vries/gcc_versions/devel/src/libgfortran/io/unit.c:244
#3  0x77b65128 in get_gfc_unit (n=10, do_create=1)
at /home/vries/gcc_versions/devel/src/libgfortran/io/unit.c:356
#4  0x77b652d8 in _gfortrani_find_or_create_unit (n=10)
at /home/vries/gcc_versions/devel/src/libgfortran/io/unit.c:421
#5  0x77b58941 in _gfortran_st_open (opp=0x7fffd630)
at /home/vries/gcc_versions/devel/src/libgfortran/io/open.c:889
#6  0x004007f1 in MAIN__ ()
#7  0x004008b7 in main ()
...

II. Unlocked from _gfortran_st_open:
...
(gdb) c
Continuing.
[New Thread 0x766bf700 (LWP 19890)]

Thread 1 "async_io_1.exe" hit Hardware watchpoint 2: ((pthread_mutex_t *)
0x6059d0)->__data.__lock

Old value = 1
New value = 0
0x76eb690c in __lll_unlock_elision (lock=0x6059d0, private=0)
at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:31
31  lll_unlock ((*lock), private);
(gdb) bt
#0  0x76eb690c in __lll_unlock_elision (lock=0x6059d0, private=0)
at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:31
#1  0x77b64b03 in __gthread_mutex_unlock (__mutex=0x6059d0)
at ../libgcc/gthr-default.h:779
#2  0x77b65e5c in _gfortrani_unlock_unit (u=0x6058f0)
at /home/vries/gcc_versions/devel/src/libgfortran/io/unit.c:772
#3  0x77b58980 in _gfortran_st_open (opp=0x7fffd630)
at /home/vries/gcc_versions/devel/src/libgfortran/io/open.c:894
#4  0x004007f1 in MAIN__ ()
#5  0x004008b7 in main ()
...

III. Locked from _gfortran_st_write:
...
(gdb) c
Continuing.

Thread 1 "async_io_1.exe" hit Hardware watchpoint 2: ((pthread_mutex_t *)
0x6059d0)->__data.__lock

Old value = 0
New value = 1
__lll_trylock_elision (futex=futex@entry=0x6059d0,
adapt_count=adapt_count@entry=0x6059e6)
at ../sysdeps/unix/sysv/linux/x86/elision-trylock.c:75
75  }
(gdb) bt
#0  __lll_trylock_elision (futex=futex@entry=0x6059d0, 
adapt_count=adapt_count@entry=0x6059e6)
at ../sysdeps/unix/sysv/linux/x86/elision-trylock.c:75
#1  0x76ead297 in __GI___pthread_mutex_trylock (mutex=0x6059d0)
at ../nptl/pthread_mutex_trylock.c:71
#2  0x77b64ad9 in __gthread_mutex_trylock (__mutex=0x6059d0)
at ../libgcc/gthr-default.h:758
#3  0x77b651d2 in get_gfc_unit (n=10, do_create=1)
at /home/vries/gcc_versions/devel/src/libgfortran/io/unit.c:380
#4  0x77b6588c in _gfortrani_get_unit (dtp=0x7fffd630, do_create=1)
at /home/vries/gcc_versions/devel/src/libgfortran/io/unit.c:576
#5  0x77b60d6d in data_transfer_init (dtp=0x7fffd630, read_flag=0)
at /home/vries/gcc_versions/devel/src/libgfortran/io/transfer.c:2851
#6  0x77b64154 in _gfortran_st_write (dtp=0x7fffd630)
at /home/vries/gcc_versions/devel/src/libgfortran/io/transfer.c:4410
#7  0x0040083f in MAIN__ ()
#8  0x004008b7 in main ()
...

IV: Unlocked from _gfortran_st_write_done:
...
(gdb) c
Continuing.

Thread 1 "async_io_1.exe" hit Hardware watchpoint 2: ((pthread_mutex_t *)
0x6059d0)->__data.__lock

Old value = 1
New value = 0
0x76eb690c in __lll_unlock_elision (lock=0x6059d0, private=0)
at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:31
31  lll_unlock ((*lock), private);
(gdb) bt
#0  0x76eb690c in __lll_unlock_elision (lock=0x6059d0, private=0)
at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:31
#1  0x77b64b03 in __gthread_mutex_unlock (__mutex=0x6059d0)
at ../libgcc/gthr-default.h:779
#2  0x77b65e5c in _gfortrani_unlock_unit (u=0x6058f0)
at /home/vries/gcc_versions/devel/src/libgfortran/io/unit.c:772
#3  0x77b6445e in _gfortran_st_write_done (dtp=0x7fffd630)
at /home/vries/gcc_versions/devel/src/libgfortran/io/transfer.c:4496
#4  0x00400880 in MAIN__ ()
#5  0x004008b7 in main ()
...

V. Unlocked again, from _gfortrani_st_write_done_worker:
...
(gdb) c
Continuing.

Thread 2 "async_io_1.exe" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x766bf700 (LWP 19890)]

[Bug c++/95719] [10/11 Regression] ICE in lookup_vfn_in_binfo at gcc/cp/class.c:2459 since r11-954-g0ddb93ce77374004

2021-04-30 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95719

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek  ---
And to 8 branch too.

[Bug middle-end/90773] Improve piecewise operation

2021-04-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90773

--- Comment #7 from CVS Commits  ---
The master branch has been updated by H.J. Lu :

https://gcc.gnu.org/g:86c77c52f7b812adccf9620860f7c392f9a16cfc

commit r12-313-g86c77c52f7b812adccf9620860f7c392f9a16cfc
Author: H.J. Lu 
Date:   Thu Apr 29 11:12:09 2021 -0700

Don't use nullptr return from simplify_gen_subreg

Check nullptr return from simplify_gen_subreg.  Don't use it if it is
nullptr.

PR middle-end/90773
* builtins.c (builtin_memset_gen_str): Don't use return from
simplify_gen_subreg.

[Bug libgomp/100352] libgomp.fortran/async_io_1.f90 -O0 execution test

2021-04-30 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100352

--- Comment #3 from Tom de Vries  ---
Minimal example:
...
program main
  implicit none
  open (10, file='a.dat', asynchronous="yes")
  write (10,*,asynchronous="yes") 4, 3
end program
...

[Bug libgomp/100352] libgomp.fortran/async_io_1.f90 -O0 execution test

2021-04-30 Thread vries at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100352

--- Comment #2 from Tom de Vries  ---
More complete backtrace using reproduction on command line:
...
Thread 1 "async_io_1.exe" received signal SIGSEGV, Segmentation fault.
__lll_unlock_elision (lock=0x6069d0, private=0)
at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:29
29  _xend();
(gdb) bt
#0  __lll_unlock_elision (lock=0x6069d0, private=0)
at ../sysdeps/unix/sysv/linux/x86/elision-unlock.c:29
#1  0x77b64b03 in __gthread_mutex_unlock (__mutex=0x6069d0)
at ../libgcc/gthr-default.h:779
#2  0x77b65e5c in _gfortrani_unlock_unit (u=0x6068f0)
at /home/vries/gcc_versions/devel/src/libgfortran/io/unit.c:772
#3  0x77b6445e in _gfortran_st_write_done (dtp=0x7fffd5e0)
at /home/vries/gcc_versions/devel/src/libgfortran/io/transfer.c:4496
#4  0x0040116a in MAIN__ ()
#5  0x00401af0 in main ()
...

OK, se we're hitting this case: unlocking a free lock:
...
(gdb) l
24  __lll_unlock_elision(int *lock, int private)
25  {
26/* When the lock was free we're in a transaction.
27   When you crash here you unlocked a free lock.  */
28if (*lock == 0)
29  _xend();
30else
31  lll_unlock ((*lock), private);
32return 0;
33  }
...

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

Richard Biener  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

--- Comment #9 from Richard Biener  ---
Testing backports.

[Bug c++/98032] [8/9 Regression] ICE (segfault) on arm-linux-gnueabihf

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98032

--- Comment #8 from Richard Biener  ---
Which is, I think, a duplicate of this bug.

  1   2   >