Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,
We found a possible wrong-code issue with our new testing tool. Please look at
the details below.
$cat
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,
We found an interesting wrong-code issue with our new testing tool. It seems
gcc-trunk with -O3 eliminates a live
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,
GCC-12.0 to GCC-12.3 versions fail to compile the following code.
$cat small.c
struct a {
long b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110129
--- Comment #2 from Haoxin Tu ---
(In reply to Andrew Pinski from comment #1)
Oops, my bad. Thank you for pointing this out. I didn't notice the front-end is
C++ in GodBolt.
I have another similar case, can you take a look, please?
```
#includ
: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,
Please consider the following code, which makes GCC output different results on
-O0/1 and -O2/3/s. Note
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: marxin at gcc dot gnu.org
Target Milestone
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
This seems a long latent bug existed after GCC-10.1.
$cat small.c
#include
#include
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103222
--- Comment #6 from Haoxin Tu ---
(In reply to Aldy Hernandez from comment #5)
> fixed
Thank you for the quick fixing!
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
$cat small.c
#include
#include
int16_t a;
static uint32_t *b ;
static uint8_t
: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
I am not sure whether there is a dup but it appears to be a
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
It seems to be a recent regression issue.
$cat small.c
#include
#include
int32_t a[6];
int64_t b;
int32_t *c
: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
$cat small.c
#include
int a[][1];
int b
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102561
--- Comment #1 from Haoxin Tu ---
Similar case:
#include
int a;
void b(int c) {
uint16_t d;
uint16_t *e;
int16_t f;
int64_t g;
if ((g || (d = 0)) == c << (0 <= (*e ^= c)))
*e - f && (a = d);
}
Error:
during GIMPLE pass: vrp-thre
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
It appears to be a quite recent regression issue.
$cat
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
It's quite weird that the following small valid program makes GCC spend too
much time on compiling at -O3 with the "-g" enabled. It
: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
This program makes GCC ICE. I think this program is syntactically valid and GCC
should not emit any error. I found
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99694
--- Comment #17 from Haoxin Tu ---
Thank you all for the detailed clarification! I have got the answer now. Let's
try together to make compilers a better place:)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99694
--- Comment #13 from Haoxin Tu ---
(In reply to Martin Liška from comment #12)
Ok, got you. Thanks for your speedy reply~
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99694
--- Comment #11 from Haoxin Tu ---
Hi all.
I hope you all are doing well.
I am sorry to bother you again. May I ask a quick question about how do you
treat the bug-revealing test case which may include the valid syntax but
contain the UB? (e.g.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100626
--- Comment #4 from Haoxin Tu ---
I found that it also crashes (under -O1 and -Os) on today's trunk version of
GCC.
$cat small.c
#include
int a;
void b() {
int c;
uint64_t *d = &c;
uint8_t *e;
if (a)
*d &= *e;
if (*d)
for (;;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100626
--- Comment #1 from Haoxin Tu ---
Another test case that crashes on all -O1 to -Os.
$cat small.c
#include
int uc_4, i_5, us_7;
void fn1() {
int li_18;
int64_t *ptr_43 = &li_18;
for (; us_7;) {
fn2();
*ptr_43 ^= uc_4;
}
i_5 =
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
I don't know if there is a dup of this. I have searched but failed.
$cat small.c
#include
int uc_4, i_5, us_7;
void fn1() {
int li_18;
in
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
$cat small.c
#include
void a() {
int b;
c:
int8_t d = 3;
if (b |= d ^= a >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100512
--- Comment #1 from Haoxin Tu ---
(In reply to Haoxin Tu from comment #0)
> $gcc -w -O2
Sorry, it's an incomplete command here. It should be "gcc -w -O2 small.c".
: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
$cat
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
$cat small.c
#include
uint8_t a;
b(int8_t c) {
int d;
e:
uint32_t f;
for (;;)
for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99947
--- Comment #7 from Haoxin Tu ---
Thank you all for your quick response and fixing!
Cheers,
Haoxin
e-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
$cat small.c
#include
int a, b, d, e;
int16_t c;
void f() {
f
-valid-code
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
This valid program makes GCC crash at -O3. GCC-10 also incurs an ICE with a
Segmentation
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99694
--- Comment #7 from Haoxin Tu ---
(In reply to Martin Liška from comment #1)
> Confirmed, started with r9-7156-g33579b59aaf02eb7.
Hi Martin. I am sorry to bother you, and I just have a question about how to
find a bad commit quickly in GCC.
As
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all.
GCC takes too much compiling time and then crashes on the valid small.c under
-O2 to -Os. Also, all GCC-9 upward versions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #12 from Haoxin Tu ---
(In reply to Paul Sokolovsky from comment #11)
Awesome! I got your main idea here. Thank you very much, Paul!
Best,
Haoxin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
--- Comment #9 from Haoxin Tu ---
(In reply to ktkachov from comment #8)
> When I had to do it in the past I've used the 'ulimit' command in linux.
> That allows you to kill a process if it exceeds a time limit (ulimit -t) or
> a memory limit (u
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
Haoxin Tu changed:
What|Removed |Added
CC||haoxintu at gmail dot com
--- Comment #7
-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat small.c
#include
#include
struct {
int64_t a;
} b;
struct c {
signed d : 9;
signed a : 21;
signed e : 1;
};
int f, g;
uint16_t h() {
struct c aa = {0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98051
--- Comment #3 from Haoxin Tu ---
(In reply to H.J. Lu from comment #2)
> Please try the current master branch.
Ok, I can't reproduce it in the current trunk, either. Will check more next
time before I submit a report.
BTW, could you please cl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98051
--- Comment #1 from Haoxin Tu ---
*** Bug 98050 has been marked as a duplicate of this bug. ***
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98050
Haoxin Tu changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi all. The small.cc makes GCC-trunk crash under O2~Os, while O0-O1 is fine.
$cat small.c
#include
void a
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Input:
//small.cc
void foo(int[] alignas[1] alignas()){}
Command:
g++ small.cc
Output:
small.cc:1:23: error
: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Input:
//small.cc
void foo(int[] alignas[1
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Input:
//small.cc
typedef class {
class a {};
class : virtual a {};
} b;
void foo(){ b{};}
Command:
g++ small.cc
Output:
small.cc: In function ‘void foo()’:
small.cc:5
-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Input:
//small.cc
struct A{
void a(){
struct B {
void b () noexcept
-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, reduced by C-Vise, makes GCC-trunk ICE and released
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
Following code is invalid I think, the "alignas" shouldn't be in function
parameter. I guess G
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code might be a invalid code, but GCC accepts it well. Other mainstream
compilers reject this code.
Code:
namespace {
template
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
Following code might be a invalid code? GCC accepts it while Clang or ICC
rejects it.
Code:
[[gnu::const ...
-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code makes GCC-9.1 onwards versions ICE without any error messages. I
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, similar with bug 96464 code, makes GCC-7.1 onwards versions ICE or
"confused by earlier errors
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96462
--- Comment #2 from Haoxin Tu ---
(In reply to Marek Polacek from comment #1)
> Confirmed.
Hi, Marek. Thanks for your quick response!
Best,
Haoxin
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code is invalid code I guess, but GCC-6.0 onwards versions accept it.
$cat small.cc
template class b {};
void foo(){
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This
: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, reduced by C-Vise, makes GCC-trunk ICE and makes released GCC
versions "confused by early errors".
Input:
//small.cc
enum struct a : struct {};
template enum class a : class c{};
enum struct a {b};
Command:
g+
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, reduced by C-Vise, makes GCC-trunk ICE and
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, reduced by C-Vise, makes GCC
, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, reduced by C-Vise, makes GCC-trunk ICE, while GCC-10 and
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, reduced by C-Vise, makes GCC-trunk ICE, while GCC-10 and downwards
versions behave well in error-recovery.
Input:
//small.cc
template <()> void A(auto){}
Command:
g++ small.cc
Output:
small.cc:1:11: error: ex
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This invalid code makes
-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
Input:
//small.cc
const int a = 0;
const long b = 1 ;
enum struct c;
template enum
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96184
--- Comment #1 from Haoxin Tu ---
This behavior still exists in the current trunk.
Is this a bug or not?
Thanks
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
Weirdly, this simple valid code makes GCC ICE (clang,icc,or msvc accepts this
code).
Input:
//small.cc
auto a
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This invalid code makes GCC ICE and without any error diagnostic
-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This invlaid code makes GCC ICE. What shocked me is that when I change the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96137
--- Comment #4 from Haoxin Tu ---
Add two cases. I guess the reason is the same.
//case1
static_assert (->operator a, "")
//case2
alignas (->operator a)
Version: 11.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone
NCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
Weirdly, a single "friend" make
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,all.
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#727
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
Alias template is allowed since c++11 while using-directive is not. The
diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test1.cc and test2.cc ( they are in the same meaning I guess), are
invalid c
s: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, is an invalid code, GCC compiles it well, while other
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
--- Comment #1 from Haoxin Tu ---
Add a more case.
$cat p.cc
#include
int a() {
for (static int & b) {}
}
$g++ p.cc
test.cc: In function ‘int a()’:
test.cc:3:24: error: expected ‘;’ before ‘)’ token
3 | for (static int & b) {}
sion: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, GCC-trunk and other versions (etc., GCC-10
RMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,all.
This code, test.cc, is an invalid code but GCC accept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96182
--- Comment #2 from Haoxin Tu ---
(In reply to Jakub Jelinek from comment #1)
> The difference is that in C++11 the standard requires that the body of a
> constexpr function is return expression, that is not the case of C++14
> anymore.
> And, yo
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,all.
This code, test.cc, is an invalid code I guess, but GCC accepts it.
$cat test.cc
constexpr int
foo
: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, is an invalid code, makes GCC-trunk ICE
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, uses a typedef name of a union as a return type of a
function, the GCC compiled output might be weird
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96137
--- Comment #3 from Haoxin Tu ---
(In reply to Marek Polacek from comment #2)
> I would treat them just like ICEs. They are useful if the testcase isn't
> complete garbage. This one is sort of useful because it shows that my
> change above has
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96137
--- Comment #1 from Haoxin Tu ---
Also, I want to know are those cases (invalid code but makes GCC hang on) worth
reporting? If those cases can help improve the GCC FE or its performance, I
will continue to file more reports. Otherwise, I will ju
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This simple code makes GCC-trunk hang on. The memory seems ok, only with
endless compiling.
$cat bug.cc
void a () { .operator b }
$g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96120
--- Comment #3 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #1)
> (In reply to Haoxin Tu from comment #0)
> > GCC might emit the ambiguity diagnostic message on it.
>
> What does that mean?
Apologize for my expression. I mean th
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, GCC might emit the ambiguity diag
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code might be an invalid code, but GCC accepts this well.
$cat test.cc
int main(){
try {}
catch (int
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, combines a typedef specifier and a normal type specifier, might be
an invalid code.
$cat test.cc
typedef long
ts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,all.
This code, might be an invalid code, but GCC accepts it.
$cat test.cc
using alias1 = e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95972
--- Comment #4 from Haoxin Tu ---
(In reply to Marek Polacek from comment #3)
> You can still use creduce (I do), but it's good to try adding missing
> parens/braces and similar to make the code more sensible.
Yes, you are right. Thanks for you
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96110
--- Comment #5 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #2)
> This isn't specific to catch handlers, other compilers accept that nonsense
> function declaration in various contexts, and GCC rejects them all:
Thanks for your c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95972
--- Comment #2 from Haoxin Tu ---
Update a new case.
Input:
int a() { [] ( auto class {int b()}}
Output:
: In function 'int a()':
:1:27: error: types may not be defined in parameter types
1 | int a() { [] ( auto class {int b()}}
|
NCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
The code test.cc
int main(){
try {}
catch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96097
Haoxin Tu changed:
What|Removed |Added
CC||haoxintu at gmail dot com
--- Comment #3
diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, "decltype(auto)" in return type is a c++14 extension and I guess GCC
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, GCC rejects it in versions from 9.1 to trunk, but accepts
it from 8.3 to 4.8 versions.
$c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96077
--- Comment #2 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #1)
> It's not ideal to provide a testcase that doesn't compile for an
> accepts-invalid bug. A testcase that actually compiles is a better
> demonstration that the inval
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, has a grammar issue in "missing ')'", but GCC accepts it
well.
$cat test.cc
enum { a = ( 1
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
As the summary, extra ";" should be allowed in GCC after -std=c++11 and
should
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This small code, bug.cc, the -Wreturn-type warning disappears when add -O1 or
higher optimization option
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This invalid code, bug.cc, makes GCC-trunk ICE.
$cat bug.cc
struct a {template class A;};
a : b ( auto ) ( class { });
$g++ -c -w
: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This simple code, bug.cc, GCC-trunk can not emit the right diagnostic
information.
$cat bug.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95932
--- Comment #1 from Haoxin Tu ---
Add a more meaningful case.
$cat p.cc
template class a {};
template >
struct a < class b{}, struct b {}>;
$g++ p.cc
p.cc:2:28: error: expected ‘class’ or ‘typename’ before ‘>’ token
2 | template >
1 - 100 of 186 matches
Mail list logo