[Bug lto/100728] "lto1.exe fatal error: errors during merging of translation units" on Windows ME

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100728

--- Comment #1 from Andrew Pinski  ---
"could not read lto-wrapper output"

[Bug c++/100611] coroutines: destructor called too many times for coroutine lambda stored object

2021-05-23 Thread jehelset at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100611

John Eivind Helset  changed:

   What|Removed |Added

 CC||jehelset at gmail dot com

--- Comment #2 from John Eivind Helset  ---
Maybe related: https://godbolt.org/z/vsc8MYTcn

In my case it seemed like co_awaiting expressions that involved
compiler-generator constructors binding references to pr-values was
problematic, or something along these lines. 

Was a problem on 11.1. Couldn't reproduce on 10.2.

[Bug c/100729] New: Inconsistency in -Wformat-extra-args when first-to-check is 0 and format string is NULL

2021-05-23 Thread wellnhofer at aevum dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100729

Bug ID: 100729
   Summary: Inconsistency in -Wformat-extra-args when
first-to-check is 0 and format string is NULL
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wellnhofer at aevum dot de
  Target Milestone: ---

This doesn't generate a warning:

--

#include 

__attribute__ ((format(printf, 1, 0)))
void format(const char *fmt);

void test(void) {
format(NULL);
}

--

But simply appending another parameter does:

--

#include 

__attribute__ ((format(printf, 1, 0)))
void format(const char *fmt, int extra);

void test(void) {
format(NULL, 0);
}

--

I have no idea whether NULL format strings should generate a warning when
first-to-check is 0, but extra parameters should not change the behavior.

[Bug debug/100725] dwarf error with --whole-program

2021-05-23 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100725

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Those binutils are too old for dwarf5.
When the linker doesn't print any diagnostics, that isn't a big deal, but if it
needs to diagnose something and parse DWARF for that, you need 2.35 or later.

[Bug bootstrap/100730] New: h8300-linux: unused parameter, statement may fall through, control reaches end of non-void function

2021-05-23 Thread jbglaw--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100730

Bug ID: 100730
   Summary: h8300-linux: unused parameter, statement may fall
through, control reaches end of non-void function
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jbg...@lug-owl.de
  Target Milestone: ---

Hi!

I started doing GCC testing again and found an issue with the h8/300 backend.

Used GCC is:

$ /usr/lib/gcc-snapshot/bin/gcc --version
gcc (Debian 20210320-1) 11.0.1 20210320 (experimental) [master revision
3279a9a5a9a:6526c452d22:5f256a70a05fcfc5a1caf56678ceb12b4f87f781]
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /usr/lib/gcc-snapshot/bin/g++ --version
g++ (Debian 20210320-1) 11.0.1 20210320 (experimental) [master revision
3279a9a5a9a:6526c452d22:5f256a70a05fcfc5a1caf56678ceb12b4f87f781]
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Source tree is:
$ git show
warning: unable to access '/root/.config/git/attributes': Permission denied
warning: unable to access '/root/.config/git/attributes': Permission denied
commit c4771b3438a8cd9afcef1762957b763f8df3fa6e
Author: Andre Vehreschild 
Date:   Sat May 22 13:36:31 2021 +0200

PR98301 Add missing changelog entries.


Building like so:

$ .../configure --target=h8300-linux --enable-werror-always
--enable-languages=all --prefix=/tmp/gcc-h8300-linux

$ make all-gcc
[...]
[all 2021-05-23 07:37:55] /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2
-DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I.
-I../.././gcc -I../.././gcc/. -I../.././gcc/../include
-I../.././gcc/../libcpp/include -I../.././gcc/../libcody 
-I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/dpd
-I../libdecnumber -I../.././gcc/../libbacktrace   -o h8300.o -MT h8300.o -MMD
-MP -MF ./.deps/h8300.TPo ../.././gcc/config/h8300/h8300.c
[all 2021-05-23 07:37:58] ../.././gcc/config/h8300/h8300.c: In function 'void
h8300_emit_stack_adjustment(int, long int, bool)':
[all 2021-05-23 07:37:58] ../.././gcc/config/h8300/h8300.c:455:65: error:
unused parameter 'in_prologue' [-Werror=unused-parameter]
[all 2021-05-23 07:37:58]   455 | h8300_emit_stack_adjustment (int sign,
HOST_WIDE_INT size, bool in_prologue)
[all 2021-05-23 07:37:58]   |  
 ~^~~
[all 2021-05-23 07:37:58] ../.././gcc/config/h8300/h8300.c: In function
'rtx_def* push(int, bool)':
[all 2021-05-23 07:37:58] ../.././gcc/config/h8300/h8300.c:514:20: error:
unused parameter 'in_prologue' [-Werror=unused-parameter]
[all 2021-05-23 07:37:58]   514 | push (int rn, bool in_prologue)
[all 2021-05-23 07:37:58]   |   ~^~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c: In function 'const
char* output_plussi(rtx_def**, bool)':
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2707:11: error: this
statement may fall through [-Werror=implicit-fallthrough=]
[all 2021-05-23 07:37:59]  2707 |   if (!need_flags)
[all 2021-05-23 07:37:59]   |   ^~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2710:9: note: here
[all 2021-05-23 07:37:59]  2710 | case 0xfffc:
[all 2021-05-23 07:37:59]   | ^~~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2711:11: error: this
statement may fall through [-Werror=implicit-fallthrough=]
[all 2021-05-23 07:37:59]  2711 |   if (!need_flags)
[all 2021-05-23 07:37:59]   |   ^~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2714:9: note: here
[all 2021-05-23 07:37:59]  2714 | case 0x0001:
[all 2021-05-23 07:37:59]   | ^~~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2716:11: error: this
statement may fall through [-Werror=implicit-fallthrough=]
[all 2021-05-23 07:37:59]  2716 |   if (!need_flags)
[all 2021-05-23 07:37:59]   |   ^~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c:2722:9: note: here
[all 2021-05-23 07:37:59]  2722 | case 0x:
[all 2021-05-23 07:37:59]   | ^~~~
[all 2021-05-23 07:37:59] ../.././gcc/config/h8300/h8300.c: In function
'unsigned int compute_plussi_length(rtx_def**, bool)':
[all 2021-05-23 07:37:59] ../.././gcc/con

[Bug target/100704] Vector register isn't used to push BLKmode argument onto stack

2021-05-23 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100704

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Keywords||patch
   Target Milestone|--- |12.0
 Ever confirmed|0   |1
   Last reconfirmed||2021-05-23
URL||https://gcc.gnu.org/piperma
   ||il/gcc-patches/2021-May/571
   ||027.html

--- Comment #3 from H.J. Lu  ---
Here is a micro benchmark of push vs vector load/store:

https://gitlab.com/x86-benchmarks/microbenchmark/-/tree/push

[hjl@gnu-cfl-2 microbenchmark]$ make
gcc -g -I. -O2   -c -o test.o test.c
gcc -g -I. -O2   -c -o push.o push.c
/usr/gcc-12.0.0-x32-push/bin/gcc -g -I. -O2 -Dmove=move128 -mno-push-args -c -o
move128.o move.c
/usr/gcc-12.0.0-x32-push/bin/gcc -g -I. -O2 -Dmove=move256 -mavx2
-mno-push-args -c -o move256.o move.c
gcc -o test test.o push.o move128.o move256.o
./test
push   : 213630
move128: 174842
move256: 155407
[hjl@gnu-cfl-2 microbenchmark]$ 

push is slower than vector load/store.

A patch is posted at

https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571027.html

[Bug target/100726] Error starting program: The libstdc++-6.dll file is linked to missing export KERNEL32.DLL:CreateHardLinkW on windows me

2021-05-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100726

--- Comment #5 from Jonathan Wakely  ---
(In reply to Andrew Pinski from comment #2)
> I really doubt anything before Windows XP is supported really.

I have no interest in making the filesystem library work on old versions of
Windows. If we expect libstdc++ to be usable there, that function should just
report an error on old versions.

[Bug c++/100721] Warn when assigning to temporary

2021-05-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100721

Jonathan Wakely  changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Blocks||87403
   Keywords||diagnostic


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning

[Bug target/100726] Error starting program: The libstdc++-6.dll file is linked to missing export KERNEL32.DLL:CreateHardLinkW on windows me

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

--- Comment #6 from cqwrteur  ---
(In reply to Jonathan Wakely from comment #5)
> (In reply to Andrew Pinski from comment #2)
> > I really doubt anything before Windows XP is supported really.
> 
> I have no interest in making the filesystem library work on old versions of
> Windows. If we expect libstdc++ to be usable there, that function should
> just report an error on old versions.

I do not know whether there is a setting to disable filesystem in dll when we
build GCC.

--disable-libstdcxx-filesystem-ts does not seem to work.

Just disable it.

[Bug c++/100700] -Wreturn-type has many false positives

2021-05-23 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100700

--- Comment #7 from Jonathan Wakely  ---
Right, and of course there are many -Wreturn-type cases where no switches or
enums are involved at all.

The warning is about the missing return from the end of the function, not about
the switch that happens before that. Determining that the end of the function
was reached because of a misunderstanding about how enumerations work (either
in the standard, or in GCC without -fstrict-enums) is probably not easy.

[Bug target/100726] Error starting program: The libstdc++-6.dll file is linked to missing export KERNEL32.DLL:CreateHardLinkW on windows me

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

--- Comment #7 from cqwrteur  ---
(In reply to cqwrteur from comment #6)
> (In reply to Jonathan Wakely from comment #5)
> > (In reply to Andrew Pinski from comment #2)
> > > I really doubt anything before Windows XP is supported really.
> > 
> > I have no interest in making the filesystem library work on old versions of
> > Windows. If we expect libstdc++ to be usable there, that function should
> > just report an error on old versions.
> 
> I do not know whether there is a setting to disable filesystem in dll when
> we build GCC.
> 
> --disable-libstdcxx-filesystem-ts does not seem to work.
> 
> Just disable it.

And do not define feature testing macro __cpp_lib_filesystem

[Bug bootstrap/100730] h8300-linux: unused parameter, statement may fall through, control reaches end of non-void function

2021-05-23 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100730

Jeffrey A. Law  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |law at gcc dot gnu.org
 CC||law at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2021-05-23

[Bug bootstrap/100731] New: GCC 11 fails to build using GCC 4.8 because of missing includes

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

Bug ID: 100731
   Summary: GCC 11 fails to build using GCC 4.8 because of missing
includes
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: harald at gigawatt dot nl
  Target Milestone: ---

When building GCC 11 with GCC 4.8 on a platform without _GLIBCXX_USE_C99, the
build fails. The result is:

../../gcc-11.1.0/c++tools/server.cc: In function ‘void internal_error(const
char*, ...)’:
../../gcc-11.1.0/c++tools/server.cc:199:10: error: ‘exit’ was not declared in
this scope
   exit (2);
  ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void error(const char*,
...)’:
../../gcc-11.1.0/c++tools/server.cc:233:10: error: ‘exit’ was not declared in
this scope
   exit (1);
  ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void print_usage(int)’:
../../gcc-11.1.0/c++tools/server.cc:284:15: error: ‘exit’ was not declared in
this scope
   exit (status);
   ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void print_version()’:
../../gcc-11.1.0/c++tools/server.cc:299:10: error: ‘exit’ was not declared in
this scope
   exit (0);
  ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘int
maybe_parse_socket(std::string&, module_resolver*)’:
../../gcc-11.1.0/c++tools/server.cc:828:48: error: ‘strtoul’ was not declared
in this scope
unsigned port = strtoul (cptr + 1, &endp, 10);
^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void internal_error(const
char*, ...)’:
../../gcc-11.1.0/c++tools/server.cc:200:1: warning: ‘noreturn’ function does
return [enabled by default]
 }
 ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void print_version()’:
../../gcc-11.1.0/c++tools/server.cc:300:1: warning: ‘noreturn’ function does
return [enabled by default]
 }
 ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void print_usage(int)’:
../../gcc-11.1.0/c++tools/server.cc:285:1: warning: ‘noreturn’ function does
return [enabled by default]
 }
 ^
../../gcc-11.1.0/c++tools/server.cc: In function ‘void error(const char*,
...)’:
../../gcc-11.1.0/c++tools/server.cc:234:1: warning: ‘noreturn’ function does
return [enabled by default]
 }
 ^

If the functions from  are wanted, this file should just include
 directly rather than relying on C++ headers pulling it in.

This happens for me on uclibc but is reproducible on glibc by locally modifying
GCC 4.8's c++config.h to not define _GLIBCXX_USE_C99.

[Bug bootstrap/100731] GCC 11 fails to build using GCC 4.8 because of missing includes

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

--- Comment #1 from Harald van Dijk  ---
The full configure line I used for reproducing this on glibc, btw:

  ../gcc-11.1.0/configure --prefix=$HOME/gcc-11.1.0-run CC=gcc-4.8.5
CXX=g++-4.8.5 --enable-languages=c,c++

[Bug bootstrap/100731] GCC 11 fails to build using GCC 4.8 because of missing includes

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

--- Comment #2 from Harald van Dijk  ---
There are more missing or wrong includes here: looking at the code, it's also
using functions from  without including that, but that one gets
implicitly included for me even on this old G++ so happens to not cause an
error. It's also using strrchr from  while only including 
and not qualifying as std::strrchr, which will work on all GCC versions but is
not correct.

[Bug c++/100721] Warn when assigning to temporary

2021-05-23 Thread davidfromonline at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100721

David Stone  changed:

   What|Removed |Added

 CC||davidfromonline at gmail dot 
com

--- Comment #1 from David Stone  ---
https://bugs.llvm.org/show_bug.cgi?id=50438 is the matching clang bug, so you
can coordinate on naming the flag.

[Bug c/100732] New: ICE: in ao_ref_init_from_ptr_and_range, at tree-ssa-alias.c:824

2021-05-23 Thread cnsun at uwaterloo dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100732

Bug ID: 100732
   Summary: ICE: in ao_ref_init_from_ptr_and_range, at
tree-ssa-alias.c:824
   Product: gcc
   Version: tree-ssa
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.bSd6dDcXdE-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210523 (experimental) [master revision
:c92372ce3:15d30d2f20794d29ceabcfd57d230d6387284115] (GCC)

$ cat mutant.c
d4(i) { __builtin_sprintf(d4, "%s", i); }

$ gcc-trunk -O3 -Wall mutant.c
mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
1 | d4(i) { __builtin_sprintf(d4, "%s", i); }
  | ^~
mutant.c: In function ‘d4’:
mutant.c:1:1: warning: type of ‘i’ defaults to ‘int’ [-Wimplicit-int]
mutant.c:1:27: warning: passing argument 1 of ‘__builtin_sprintf’ from
incompatible pointer type [-Wincompatible-pointer-types]
1 | d4(i) { __builtin_sprintf(d4, "%s", i); }
  |   ^~
  |   |
  |   int (*)()
mutant.c:1:27: note: expected ‘char *’ but argument is of type ‘int (*)()’
mutant.c:1:33: warning: format ‘%s’ expects argument of type ‘char *’, but
argument 3 has type ‘int’ [-Wformat=]
1 | d4(i) { __builtin_sprintf(d4, "%s", i); }
  |~^   ~
  | |   |
  | |   int
  | char *
  |%d
mutant.c:1:41: warning: control reaches end of non-void function
[-Wreturn-type]
1 | d4(i) { __builtin_sprintf(d4, "%s", i); }
  | ^
during GIMPLE pass: uninit
mutant.c:1:1: internal compiler error: in ao_ref_init_from_ptr_and_range, at
tree-ssa-alias.c:824
1 | d4(i) { __builtin_sprintf(d4, "%s", i); }
  | ^~
0x7750a5 ao_ref_init_from_ptr_and_range
/tmp/tmp.bSd6dDcXdE-gcc-builder/gcc/gcc/tree-ssa-alias.c:824
0x113b3b1 maybe_warn_pass_by_reference
/tmp/tmp.bSd6dDcXdE-gcc-builder/gcc/gcc/tree-ssa-uninit.c:545
0x113b3b1 warn_uninitialized_vars
/tmp/tmp.bSd6dDcXdE-gcc-builder/gcc/gcc/tree-ssa-uninit.c:659
0x114056a execute
/tmp/tmp.bSd6dDcXdE-gcc-builder/gcc/gcc/tree-ssa-uninit.c:3030
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

[Bug middle-end/100733] New: -fcompare-debug failure for pr85213.c at -O1 -fdisable-tree-phiopt2

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100733

Bug ID: 100733
   Summary: -fcompare-debug failure for pr85213.c at -O1
-fdisable-tree-phiopt2
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: wrong-debug
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

So while modifying phi-opt, I ran into pr85213.c testcase failing with the C++
front-end. BUT the problem is not related at all to PHI-OPT changes as the IR
coming out of the front-end is hugely different with and without debug
information turned on.

Without debug info turned on we start with:
NON_LVALUE_EXPR 
>;

But with:
NON_LVALUE_EXPR >


It just happens with the PHI-OPT, by the time we get to expand, the IR is very
similar BUT the difference comes from SSA names are different.

You can reproduce the failure on the trunk without any patches to PHI-OPT by
doing:
g++ -O1 -fsanitize=undefined -fcompare-debug -fdisable-tree-phiopt2
c-c++-common/ubsan/pr85213.c

[Bug middle-end/100733] -fcompare-debug failure for pr85213.c at -O1 -fdisable-tree-phiopt2

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100733

--- Comment #1 from Andrew Pinski  ---
Note in older versions of GCC (8.x), disabling phiopt1 is needed instead of
phiopt2.

[Bug fortran/100551] [11/12 Regression] Passing return value of intrinsic to class(*) dummy argument can cause segfaults

2021-05-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100551

--- Comment #6 from CVS Commits  ---
The master branch has been updated by Harald Anlauf :

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

commit r12-1005-gfe03f4fc9548b3fdbff3c8284a994feaa7d6307d
Author: Harald Anlauf 
Date:   Sun May 23 20:51:14 2021 +0200

Fortran: fix passing return value to class(*) dummy argument

gcc/fortran/ChangeLog:

PR fortran/100551
* trans-expr.c (gfc_conv_procedure_call): Adjust check for
implicit conversion of actual argument to an unlimited polymorphic
procedure argument.

gcc/testsuite/ChangeLog:

PR fortran/100551
* gfortran.dg/pr100551.f90: New test.

[Bug fortran/100724] -fwhole-program breaks module use

2021-05-23 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100724

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

  Known to work||7.5.0
 Ever confirmed|0   |1
   Keywords||link-failure, wrong-code
   Last reconfirmed||2021-05-23
 CC||anlauf at gcc dot gnu.org
 Status|UNCONFIRMED |NEW

--- Comment #1 from anlauf at gcc dot gnu.org ---
Interesting bug.

With optimization enabled (e.g. -O) I find a linking failure with 8.5.0
and newer, except when I add -ftlo.

With -fwhole-program -O -flto the program seems to work up to 11.1, but
fails with 12.0 (hangs).

With -fwhole-program -O0 it also hangs with 12.0, but not with 11.1.

So there are possibly two issues, a 12-regression and an 8+-regression.

[Bug bootstrap/100734] New: /test/gnu/gcc/objdir/gcc/include-fixed/stdlib.h:291:8: internal compiler error: in from_mode_char, at attribs.h:304

2021-05-23 Thread danglin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100734

Bug ID: 100734
   Summary: /test/gnu/gcc/objdir/gcc/include-fixed/stdlib.h:291:8:
internal compiler error: in from_mode_char, at
attribs.h:304
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
  Host: hppa*-*-hpux11.11
Target: hppa*-*-hpux11.11
 Build: hppa*-*-hpux11.11

At commit a4dbd5cffa6acb100dd75017ef95dadc3d8a136f:

/test/gnu/gcc/objdir/./gcc/xgcc -B/test/gnu/gcc/objdir/./gcc/
-B/opt/gnu/gcc/gcc
-12/hppa2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-12/hppa2.0w-hp-hpux11.11/lib/
-isystem /opt/gnu/gcc/gcc-12/hppa2.0w-hp-hpux11.11/include -isystem
/opt/gnu/gcc
/gcc-12/hppa2.0w-hp-hpux11.11/sys-include   -fno-checking -g -O2 -O2  -g -O2
-DI
N_GCC-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format
-Wstric
t-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  
-
frandom-seed=fixed-seed -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector   -frandom-seed=fixed-seed -fPIC -I. -I. -I../.././gcc
-I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc
-I../../../gcc/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o dfi-stub.o -MT
dfi-stub.o -MD -MP -MF dfi-stub.dep -c -O2 -DL_deregister_frame_info
../../../gcc/libgcc/config/pa/stublib.c
In file included from ../../../gcc/libgcc/../gcc/tsystem.h:101,
 from ../../../gcc/libgcc/config/pa/stublib.c:25:
/test/gnu/gcc/objdir/gcc/include-fixed/stdlib.h:291:8: internal compiler error:
in from_mode_char, at attribs.h:304
  291 |extern int getopt(int, char * const [], const char *);
  |^~
In file included from ../../../gcc/libgcc/../gcc/tsystem.h:101,
 from ../../../gcc/libgcc/config/pa/stublib.c:25:
/test/gnu/gcc/objdir/gcc/include-fixed/stdlib.h:291:8: internal compiler error:
in from_mode_char, at attribs.h:304
  291 |extern int getopt(int, char * const [], const char *);
  |^~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[3]: *** [../../../gcc/libgcc/config/pa/t-stublib:12: dfi-stub.o] Error 1

We are hitting gcc_unreachable () in attr_access::from_mode_char (char c).

12.0.0 20210507 (experimental) (GCC) testsuite on hppa2.0w-hp-hpux11.11 build
was okay.  12.0.0 20210510 (experimental) (GCC) testsuite on
hppa64-hp-hpux11.11
was okay.

[Bug target/100722] [12 Regression] ice in extract_insn with many vector_size(4) arguments

2021-05-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100722

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Uros Bizjak :

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

commit r12-1006-gc01c4331112aaf45f0de20ed8883dbeab83ed896
Author: Uros Bizjak 
Date:   Sun May 23 22:14:21 2021 +0200

i386: Add push insns for 4-byte vectors [PR100722]

2021-05-23  Uroš Bizjak  

gcc/
PR target/100722
* config/i386/mmx.md (*push2_rex64):
New instruction pattern.
(*push2): Ditto.
(push splitter for SSE registers): New splitter.

gcc/testsuite/

PR target/100722
* gcc.target/i386/pr100722.c: New test.

[Bug target/100722] [12 Regression] ice in extract_insn with many vector_size(4) arguments

2021-05-23 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100722

Uroš Bizjak  changed:

   What|Removed |Added

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

--- Comment #3 from Uroš Bizjak  ---
Fixed.

[Bug target/100660] [12 Regression] ICE in visit_assignment, at tree-ssa-ccp.c:2451 since r12-110-gc54a9f7259fce1a2

2021-05-23 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100660

--- Comment #3 from CVS Commits  ---
The master branch has been updated by hongtao Liu :

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

commit r12-1009-gdc084c487e997e7f47cee55467628ade4488538b
Author: liuhongt 
Date:   Thu May 20 09:59:36 2021 +0800

Fix ICE when lhs is NULL.

gcc/ChangeLog:
PR target/100660
* config/i386/i386.c (ix86_gimple_fold_builtin): Replacing
stmt with GIMPLE_NOP when lhs doesn't exist.

gcc/testsuite/ChangeLog:
PR target/100660
* gcc.target/i386/pr100660.c: New test.

[Bug other/100735] New: -fno-trampolines doc wrongly implies it affects C, C++ etc.

2021-05-23 Thread eggert at gnu dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100735

Bug ID: 100735
   Summary: -fno-trampolines doc wrongly implies it affects C, C++
etc.
   Product: gcc
   Version: 11.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eggert at gnu dot org
  Target Milestone: ---

Created attachment 50859
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50859&action=edit
doc patch for -fno-trampolines confusion

The GCC manual's documentation of -fno-trampolines was apparently written from
an Ada point of view. However, when I read it I understandably mistook it to
say that -fno-trampolines also works for C, C++, etc. It doesn't: it is
silently ignored for these languages, and I assume for any language other than
Ada.

This confusion caused me to go in the wrong direction in a Gnulib dicussion, as
I mistakenly thought that entire C apps with nested functions could be compiled
with -fno-trampolines and then use nested C function in stack overflow handlers
where the alternate stack is allocated via malloc. I was wrong, as this won't
work on common platforms like x86-64 where malloc yields non-executable
storage.

A proposed fix for the GCC manual is attached.

[Bug rtl-optimization/100697] Scheduler before RA causes conflict with return register and incoming argument register

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100697

Andrew Pinski  changed:

   What|Removed |Added

Summary|Missing fwprop for argument |Scheduler before RA causes
   |register|conflict with return
   ||register and incoming
   ||argument register
 Target|arm |aarch64

--- Comment #2 from Andrew Pinski  ---
Note I don't know one move instruction hurts preformance that much. On most
modern cores, that move instruction will not even be issued and removed during
renaming.  Even the mov for constant forming of the return would be too.

[Bug lto/100728] "lto1.exe fatal error: errors during merging of translation units" on Windows ME

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100728

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andrew Pinski  ---
Maybe _pipe is not working correctly on windows ME.

Plus Windows ME has not been supported by Microsoft since 2006.  I am just
going to close this as won't fix.

[Bug target/100726] Error starting program: The libstdc++-6.dll file is linked to missing export KERNEL32.DLL:CreateHardLinkW on windows me

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100726

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|UNCONFIRMED |RESOLVED

--- Comment #8 from Andrew Pinski  ---
Windows ME has not been supported by Microsoft since 2006, this is going to
close as won't fix.

Windows XP is bare min that is supported by newer GCC's.

[Bug bootstrap/66022] 4.8.4 build fails with stage 2 and 3 comparison error

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66022

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Andrew Pinski  ---
No response in almost 5 years so closing as invalid and GCC has been building
for everyone on x86_64 in those 5 years.

[Bug libstdc++/91383] C++17 should remove some library feature deprecated in C++14

2021-05-23 Thread Sandy.Martel at lexisnexisrisk dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91383

Sandy Martel  changed:

   What|Removed |Added

 CC||Sandy.Martel@lexisnexisrisk
   ||.com

--- Comment #7 from Sandy Martel  ---
Still pretty annoying when you're in a cross-platform shop, having to
constantly remind your gcc co-workers to not use those gcc c++ extensions that
don't exist in libc++ nor msvc.

As extension to the C++17 language, maybe they should be moved to __gnu_cxx
namespace or only enabled with -std=gnu++17 .

[Bug target/100736] New: ICE: unrecognizable insn

2021-05-23 Thread asolokha at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100736

Bug ID: 100736
   Summary: ICE: unrecognizable insn
   Product: gcc
   Version: 12.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpc-*-linux-gnu

gcc-12.0.0-alpha20210523 snapshot (g:c01c4331112aaf45f0de20ed8883dbeab83ed896)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/gcc.target/powerpc/bcd-4.c, w/ -mvsx -mpower8-vector
-ffinite-math-only:

typedef __attribute__ ((altivec (vector__))) unsigned char v;

int
foo (v a, v b)
{
  return __builtin_vec_bcdsub_ge (a, b, 0);
}

% powerpc-e300c3-linux-gnu-gcc-12.0.0 -mvsx -mpower8-vector -ffinite-math-only
-c ktvdviry.c
ktvdviry.c: In function 'foo':
ktvdviry.c:7:1: error: unrecognizable insn:
7 | }
  | ^
(insn 10 9 13 2 (set (reg:SI 119 [ _5 ])
(ge:SI (reg:CCFP 106 6)
(const_int 0 [0]))) "ktvdviry.c":6:10 -1
 (nil))
during RTL pass: vregs
ktvdviry.c:7:1: internal compiler error: in extract_insn, at recog.c:2770
0x6912fa _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210523/work/gcc-12-20210523/gcc/rtl-error.c:108
0x69131a _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210523/work/gcc-12-20210523/gcc/rtl-error.c:116
0x68f987 extract_insn(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210523/work/gcc-12-20210523/gcc/recog.c:2770
0xaf6de1 instantiate_virtual_regs_in_insn
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210523/work/gcc-12-20210523/gcc/function.c:1609
0xaf6de1 instantiate_virtual_regs
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210523/work/gcc-12-20210523/gcc/function.c:1983
0xaf6de1 execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_alpha20210523/work/gcc-12-20210523/gcc/function.c:2032

[Bug tree-optimization/85605] Potentially missing optimization under x64 and ARM: seemingly unnecessary branch in codegen

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85605

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|UNCONFIRMED |RESOLVED

--- Comment #3 from Andrew Pinski  ---
Dup of bug 89263.

*** This bug has been marked as a duplicate of bug 89263 ***

[Bug tree-optimization/89263] Simplify bool expression to OR

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89263

Andrew Pinski  changed:

   What|Removed |Added

 CC||sergey.ignatchenko at ithare 
dot c
   ||om

--- Comment #4 from Andrew Pinski  ---
*** Bug 85605 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/89263] Simplify bool expression to OR

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89263

Andrew Pinski  changed:

   What|Removed |Added

 Depends on||25290
 Status|NEW |ASSIGNED

--- Comment #5 from Andrew Pinski  ---
Mine.  Depends on work for PR 25290 though.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25290
[Bug 25290] PHI-OPT could be rewritten so that is uses match

[Bug rtl-optimization/22568] Should use cmov in some stituations

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22568

--- Comment #16 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #15)
> The expr.c patch yes.  The tree-ssa-phiopt.c patch, no.  Tree-ssa-phiopt.c
> needs more code rework because of the new infrastructures so I have not
> gotten around to improving the patch yet; been busy with other stuff.

The patch for PR 25290 includes the most of the infrastructure to implement
cmov at the gimple level (See match_simplify_replacement and late_p argument)
but is not enabled because I think it might require a cost model.

[Bug tree-optimization/91540] missed value-replacement in phiopt

2021-05-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91540

--- Comment #3 from Andrew Pinski  ---
Currently on the trunk we get:
andl%edi, %esi
movl$43, %eax
movzbl  %sil, %esi
subl%esi, %eax

Which is close.

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

2021-05-23 Thread luoxhu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100085

luoxhu at gcc dot gnu.org changed:

   What|Removed |Added

 CC||luoxhu at gcc dot gnu.org

--- Comment #7 from luoxhu at gcc dot gnu.org ---
(In reply to Segher Boessenkool from comment #3)
> The rotates in 6 and 7 are not merged, and neither are the vec_selects in
> 8 and 9.  Both should be pretty easy to do, there is no unspec in sight,
> etc.

Should this be done in pass bswaps or combine or by peephole2? :)