Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc. reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
typedef (*a)()->const =
$g++ -fpermissive -w bug.cc
bug
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
void a { [].decltype(auto)::b
-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
a ( union { auto
$g
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduced by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
a() { [] ( struct { b ( auto
$g++ -w bug.cc
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat bug.cc
struct g_class : decltype (auto) ... { } ;
$g++ bug.cc
bug.cc:1:35: internal compiler error: in cxx_incomplete_type_diagnostic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
--- Comment #1 from Haoxin Tu ---
Noted that from GCC 6.1 to the trunk versions have this ICE, too.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
--- Comment #3 from Haoxin Tu ---
(In reply to Martin Liška from comment #2)
> Is it an invalid code right?
Yes. I think it's not a valid code and other compilers do not accept it, too.
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, GCC fails to compile it, while clang, icc, or msvc accepts
it well.
$cat bug.cc
namespace g_namespace
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95807
--- Comment #4 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #3)
> The ill-formed template is not diagnosed unless you instantiate it.
> That is allowed by the standard.
Thank you Jonathan, thanks for your response.
As other
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
GCC accepts "void value not ignored as it ought to be" in a function
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95807
--- Comment #2 from Haoxin Tu ---
(In reply to Andrew Pinski from comment #1)
> I think it is rejected at instanition time.
Hi, Andrew. Shouldn't it be rejected at compiling time?
Please take a look at another case, test.cc
$cat test.cc
void
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95807
--- Comment #6 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #5)
> What practical impact does this have on any real world code?
> Why should we spend time on that, rather than the million other things we
> have to fix?
Hi,
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case bug.cc, reduced by C-Reduce, crashed GCC.
$cat bug.cc
constexpr (*a)()->bool,
$g++ -w -fpermissive small.cc
bug.cc:1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95820
--- Comment #1 from Haoxin Tu ---
(In reply to Haoxin Tu from comment #0)
> $g++ -w -fpermissive small.cc
Here is a mistake, and it should be
$g++ -w -fpermissive bug.cc
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case bug.cc, reduced by C-Reduce, makes GCC crashed.
$cat bug.cc
wchar_t a = [] (struct {
$g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95725
--- Comment #6 from Haoxin Tu ---
Hi, there.
I hold the view that the compiler should have good fault tolerance, which means
giving an input(even invalid), the compiler might emit appropriate error
message diagnostics so that we can fix them
: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code, bug.cc, reduce by C-Reduce, makes GCC-trunk ICE.
$cat bug.cc
a ( auto struct { b (
$g++ -w bug.cc
bug.cc:1:17: error: types may
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95892
--- Comment #5 from Haoxin Tu ---
(In reply to Jonathan Wakely from comment #4)
> Yes, thanks, I've closed that one as a duplicate too.
Ok, you are so welcome.
By the way, could you please check other diagnostic issues (bug95871, bug95872,
diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
CC: mpolacek at gcc dot gnu.org
Target Milestone: ---
This code, bug.cc, GCC might give the wrong line number
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95725
--- Comment #7 from Haoxin Tu ---
By the way, can you take a look at bug 95597 and bug 95659? I think GCC should
accept the first case and shouldn't miss the error message in the second code.
Those cases are different from this report.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95559
--- Comment #2 from Haoxin Tu ---
(In reply to Marek Polacek from comment #1)
> I can't find a version of GCC that compiled this.
Hi, so sorry I might use the wrong test case. Please try this case bug.cc
instead
#include
int main(){
int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95559
--- Comment #3 from Haoxin Tu ---
(In reply to Haoxin Tu from comment #2)
> $g++-8 test.cc ; ./a.out
> 0
Here is
> $g++-8 bug.cc ; ./a.out
> 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95559
--- Comment #5 from Haoxin Tu ---
(In reply to Marek Polacek from comment #4)
> That's the same case, initializing an int with {{}}. GCC 8 compiled the
> second testcase, but that was fixed in r269045.
Ok, got it. At least this was a bug, can
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65969
Haoxin Tu changed:
What|Removed |Added
CC||haoxintu at gmail dot com
--- Comment #3
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case test.cc
#include
int main() {
return {{}};
}
In the version of GCC 6.1 - 8.4, it's compiled ok.
But in GCC 6.1 low
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code test.cc
int main(){
auto a = [ & ] (...) noexcept(1+1) {};
return 0;
}
$g++-trunk test.cc
test.cc:2:38: error: narrowing conversion of
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case test.cc
class s;
class ::s { } ss;
$g++ -c test.cc
test.cc:2:11: error: global qualification of class name is inva
++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code bug.cc
class A {};
class B : virtual class A{};
In gcc-trunk
$g++ -c bug.cc
bug.cc:2:19: error: expected class-name before ‘class’
2 | class B : virtual class
mponent: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code bug.cc
decltype (auto) foo( decltype (auto) a ){ }
in GCC-trunk
$g++ -c -std=c++11 bug.cc
bug.cc:1:11: error: expected primary-expression before ‘a
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code bug.cc
#include
int main(){
int a ();
std::cout << a << std::endl;
return 0;
}
In GCC-trunk without "-fsanitize=undefined"
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This code bug.cc in GCC 8.1 - 9.3 gives the bogus duplicate error messages.
$cat bug.cc
decltype (auto) var = 0;
Take GCC-9, G
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat bug.cc
int a;
long foo1 ( void = a, double param2 ,decltype (auto) param3 = a){ }
long foo2 ( void = a, doub
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
This case test.cc
typedef int T;
using typename ::T;
GCC fails to compile it.
$g++ -c test.cc
test.cc:2:18: error: expected n
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
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)
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
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
-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
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
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&quo
: 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
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97969
Haoxin Tu changed:
What|Removed |Added
CC||haoxintu at gmail dot com
--- Comment #7
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
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98050
Haoxin Tu changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|UNCONFIRMED
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. ***
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
-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=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
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 = _18;
for (; us_7;) {
fn2();
*ptr_43 ^= uc_4;
}
i_5 =
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 =
uint8_t *e;
if (a)
*d &= *e;
if (*d)
for (;;)
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 >
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;
int64_t
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
-on-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
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
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
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
: 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
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 seem
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?
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 #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:)
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
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:
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
: 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
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
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!
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
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
: 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
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
: 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
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?
```
101 - 184 of 184 matches
Mail list logo