public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97033] New: g++ hangs on valid code
@ 2020-09-12 14:31 tangyixuan at mail dot dlut.edu.cn
2020-09-12 17:21 ` [Bug c++/97033] " pinskia at gcc dot gnu.org
2020-09-16 13:34 ` changkaiyan at live dot com
0 siblings, 2 replies; 3+ messages in thread
From: tangyixuan at mail dot dlut.edu.cn @ 2020-09-12 14:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97033
Bug ID: 97033
Summary: g++ hangs on valid code
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
Hi, g++ hangs when executing the following code with -Os, while clang++ is ok.
$ cat s.cpp
namespace A {
inline int F1 (){}
}
int F2 ( int (* p )()){
return p ();
}
int main (){
return F2 ( A :: F1 );
}
$ g++ -Os s.cpp && ./a.out
<hang>
$ g++ -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-20200906/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-20200906/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-11-20200906/configure --prefix=/usr/local/gcc-20200906
--enable-checking=release --enable-languages=c,c++ --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200906 (experimental) (GCC)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/97033] g++ hangs on valid code
2020-09-12 14:31 [Bug c++/97033] New: g++ hangs on valid code tangyixuan at mail dot dlut.edu.cn
@ 2020-09-12 17:21 ` pinskia at gcc dot gnu.org
2020-09-16 13:34 ` changkaiyan at live dot com
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-09-12 17:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97033
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> inline int F1 (){}
That is undefined code.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/97033] g++ hangs on valid code
2020-09-12 14:31 [Bug c++/97033] New: g++ hangs on valid code tangyixuan at mail dot dlut.edu.cn
2020-09-12 17:21 ` [Bug c++/97033] " pinskia at gcc dot gnu.org
@ 2020-09-16 13:34 ` changkaiyan at live dot com
1 sibling, 0 replies; 3+ messages in thread
From: changkaiyan at live dot com @ 2020-09-16 13:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97033
Kaiyan Chang <changkaiyan at live dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |changkaiyan at live dot com
--- Comment #2 from Kaiyan Chang <changkaiyan at live dot com> ---
The test code is wrong. It should be
> inline int F1 (){ return 0; }
And then the g++ will ok.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-16 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-12 14:31 [Bug c++/97033] New: g++ hangs on valid code tangyixuan at mail dot dlut.edu.cn
2020-09-12 17:21 ` [Bug c++/97033] " pinskia at gcc dot gnu.org
2020-09-16 13:34 ` changkaiyan at live dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).