https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66416
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #2 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #8 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93584
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #3 from AK
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
Integer overflow reported by asan with the following stack trace. If this is
not
sufficient I can try to provide a repro
gcc/7.x
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #1 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823
--- Comment #4 from AK ---
Makes sense. Thanks for the explanation.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94823
--- Comment #5 from AK ---
> So when __k == 0, then all three of those loads will be _Type(0x8b8b8b8bu)
> really; no matter what the values of __n, __p will be.
Will it be a good idea to add the explanation in comments, as this may be
tricky f
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
The flag -finstrument-functions instruments both entry and the exit of
function. There are many scenarios (like cheap profiling
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95565
--- Comment #1 from AK ---
I believe we need to conditionally disable the following code, but I'm not sure
of all the implications. If someone can implement it that'd be great.
```
gcc/gimplify.c Around Line:14997
x = builtin_decl_impli
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$cat test.c
#include
#include
#include
#include
char* get(const char* value, const char separator) {
int separator_index
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92638
--- Comment #1 from AK ---
FYI: clang -O3 optimizes the empty loop.
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$ cat test.cpp
#include
std::atomic flag_atomic{false};
extern void f1();
extern void f2();
void foo
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$ cat test.cpp
#include
std::atomic atomic_var{100};
int somevar;
bool cond;
void run1() {
auto a
: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$ cat test.cpp
struct BigStruct {
int x[64];
};
void structByValue(BigStruct s);
void callStructByValue(int
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
test.cpp
#include
int bar(int* v, std::size_t base) {
int sum = 0;
for (int i = base; i < base + 4; ++i) {
sum += v[i];
}
ret
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17913
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #25 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22238
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #24 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12333
--- Comment #17 from AK ---
The following workarounds do not emit compiler errors, although I'm not sure if
second option is a correct workaround.
1. this->~X();
2. X::~X(0);
FYI,
ICC 18 also has the same bug. The first workaround works for ICC
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
https://godbolt.org/z/DY9ruv
void if_delete(char *p) {
if (p) {
delete(p);
}
}
$ gcc-8.2 -Os -fno-exceptions
if_delete(char*):
test rdi, rdi
je .L1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79349
AK changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79349
AK changed:
What|Removed |Added
Status|RESOLVED|NEW
Resolution|WORKSFORME
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
In file: include/bits/locale_classes.h
371 class locale::facet
372 {
...
465 class __shim;
466
467 const facet* _M_sso_shim(const id*) const;
468 const
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78702
--- Comment #2 from AK ---
Sorry for the confusion, I was using clang++ (trunk) to build libstdc++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78702
--- Comment #3 from AK ---
llvm-project/install/bin/clang++ -std=gnu++14 -D_GLIBCXX_SHARED
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$ cat test.cpp
#include
int foo(const std::string &s1, const std::string &s2, int i) {
return s1.find(s2) == i;
}
../gcc/install/usr/bin/g++ -S -o a.s
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #6 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78717
--- Comment #2 from AK ---
With -O3 I see only the following definition of find which calls the real find
function I was expecting to be visible in the gimple.
D.12805 =
_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findERKS4_mD.11635
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
g++ version (GCC) 7.0.0 20170118 (experimental)
$ cat t.cpp
#include
void foo();
int main() {
std::string s("abc&quo
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$ cat t.cpp
#include
int sain() {
const std::string s("a");
return 0;
}
# gcc version 7.0.0 20170118 (experimental) (GCC)
$ g++ -S -o t.s t.cpp -O2 -fno-excepti
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
Compiling with
g++ -O2 --std=c++14 -msse4 -DENABLE_FORLOOP
vs.
g++ -O2 --std=c++14 -msse4
gives dramatically different
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82776
--- Comment #9 from AK ---
Are we also taking advantage of this statement in the standard:
> An iteration statement that performs no input/output operations, does not
> access volatile objects, and performs no
synchronization or atomic operatio
: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$ cat t.cpp
#include
int lol(int32_t* table, int32_t* ht, uint32_t hash, uint32_t mask) {
for (uint64_t probe = (uint32_t)hash & mask, i = 1;;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46186
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #27 from AK
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
I was trying to debug a compiler crash while compiling a program with auto-fdo
enabled during which the compiler crashed. I could triage the bug to this small
case. The
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65972
--- Comment #1 from AK ---
PS: The bootstrap fails after applying this patch and emits the error reported
above.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65972
--- Comment #3 from AK ---
Created attachment 35457
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35457&action=edit
Preprocesed unwind-arm.i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65947
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #2 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65972
--- Comment #6 from AK ---
Your patch did fix the problem. Thanks!
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
Clang static analyzer reported this potential bug.
File: gcc/bt-load.c
Location: line 234, column 6
Description
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48052
--- Comment #13 from AK ---
We have an updated patch that works for both the cases.
https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01991.html
: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
A reduced test case is below:
compile with trunk gcc:
gcc -O2 -fgraphite-identity test.c
./a.out
int main(): Assertion `abcd->a[8] == 29' failed
st
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67700
--- Comment #1 from AK ---
The problem seems to be in
static void canonicalize_loop_closed_ssa (loop_p loop)
which generates phi node at a wrong place in this case.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67842
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #1 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65850
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #4 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64394
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #3 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70159
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #11 from AK
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
struct Foo {
int x;
};
struct Bar {
int x;
};
void alias(Foo* foo, Bar* bar) {
foo->x = 5;
foo->x = bar->x;
}
struct Wrap1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14
--- Comment #1 from AK ---
godbolt link: https://gcc.godbolt.org/z/f7Y6G1svf
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
In the following code generated by gcc 10.2
```
.L2:
movups xmm3, XMMWORD PTR [rax]
add rax, 16
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59048
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #17 from AK
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$ cat test.c
bool foo(unsigned i) {
return !(i & 1);
}
gcc -O2 test.c -S -o-
foo(unsigned int):
mov eax, edi
not eax
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
$ cat test.cpp
#include
using namespace std;
template
struct D {
template bool operator==(Y a) const {
cout << "f"
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
Testcase has been reduced from u-boot's linker-list macro:
https://github.com/u-boot/u-boot/blob/master/include/linker_lists.h#L127
#include
char* bar() {
s
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108915
AK changed:
What|Removed |Added
Resolution|INVALID |FIXED
--- Comment #4 from AK ---
Adding `__attrib
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109017
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #1 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92396
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #12 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78717
--- Comment #3 from AK ---
Even with a high inline limit, string::find didn't inline.
g++-11.0.2 -O3 -finline-limit=10 -S -o a.s s.cpp
cat a.s
```
_Z3fooRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_i:
.LFB1240:
.cfi_s
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82889
--- Comment #4 from AK ---
Seems like clang doesn't sign extend.
$ clang -O3 -std=c++14 -g0
```
.text
.intel_syntax noprefix
.file "example.cpp"
.globl lol(int*, int*, unsigned int, unsigned int)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82889
--- Comment #5 from AK ---
Link to compiler explorer: https://godbolt.org/z/dGYG4dG15
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87628
--- Comment #3 from AK ---
Still happening with gcc trunk.
https://godbolt.org/z/5K94665GK
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
https://godbolt.org/z/PeYcoqTKn
---
#include
#include
int volatile gv = 0;
void
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87628
--- Comment #4 from AK ---
Seems like clang now added the check:
$ clang++ -Oz -fno-exceptions
if_delete(char*): # @if_delete(char*)
testrdi, rdi
jne operator delete(void*)@PLT
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106991
--- Comment #3 from AK ---
Thanks for identifying the underlying issue @Jan
After modifying the definition of operator delete. gcc does optimize it at -O3
as well.
https://godbolt.org/z/1WPqaWrEr
// source code
#include
#include
int volatile
: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
#include
int main() { return INT_MIN / -1; }
gcc -O2
main:
mov eax, -2147483648
ret
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95565
--- Comment #2 from AK ---
clang has `-finstrument-function-entry-bare` to this effect:
https://reviews.llvm.org/D40276
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
#include
int main() {
return INT_MIN / -1;
}
$ gcc -O3
main:
mov eax, -2147483648
ret
$ clang -O3
main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107011
--- Comment #2 from AK ---
ah ok. sorry for the noise.
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
int volatile gv = 0;
void foo() {
++gv;
}
$ gcc -Os
foo():
mov eax, DWORD PTR gv[rip]
inc eax
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85611
AK changed:
What|Removed |Added
Status|WAITING |RESOLVED
Resolution|---
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
Testcase:
#include
void foo() {
std::cout << std::endl;
}
$ g++ -std=c++17 -O3 -fno-exceptions
```asm
foo():
mov rax, QWORD PTR std::cout[rip]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107335
--- Comment #4 from AK ---
I wasn't sure if this is expected. Thanks for clarifying.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107335
--- Comment #5 from AK ---
Is this the definition of throw_bad_cast?
https://github.com/gcc-mirror/gcc/blob/16e2427f50c208dfe07d07f18009969502c25dc8/gcc/cp/rtti.c#L221
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107335
AK changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
test.cpp
```
int func(int, char);
template
int testFunc(int (*)(TArgs..., char));
int x = testFunc(func);
```
With gcc trunk:
g++ -std=c
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
https://godbolt.org/z/jTEa6ajn3
```
// test.c
// Type your code here, or load an example.
/* Nonzero if either X or Y is not
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105830
--- Comment #3 from AK ---
with -ffreestanding the calls to memcpy did disappear. Thanks.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331
--- Comment #9 from AK ---
can't repro this with gcc 12.1 Seems like this is fixed?
https://godbolt.org/z/e6n94zK4E
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
#include
#include
std::vector td() {
int arr[]{-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10,
15, -5, 10, 15,-5, 10, 15 -5, 10, 15, -5, 10, 15, -5, 10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114342
AK changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Version|unknown
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59863
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #9 from AK
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107263
AK changed:
What|Removed |Added
CC||hiraditya at msn dot com
--- Comment #3 from AK
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
#include
void f(int);
void use_idx_const_size_reserve() {
std::vector v;
v.reserve(10);
auto s
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110819
--- Comment #2 from AK ---
> When compiled with clang, libstdc++'s std::vector uses __builtin_operator_new
> which always has the -fassume-sane-operator-new semantics, and so can be
> optimized.
yes clang optimizes with libstdc++ as well. wha
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110137
--- Comment #3 from AK ---
1. clang also has noalias on nothrow versions of operator new. will
`-fassume-sane-operator-new` enable that as well?
2. as per: http://eel.is/c++draft/basic.stc.dynamic#allocation-2
"""If the request succeeds, the
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
#include
using Container = std::vector;
int copy_assignment(const Container &v1, Container &v2) {
v2 = v1;
return 0;
}
I'd expect this to only generate
: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
riscv64-gnu-linux (version Debian 13.1) building llvm-project
(GlobalModuleIndex.cpp) crashed with ICE.
src/gcc/toplev.cc:314
profile_count::operator
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111393
--- Comment #1 from AK ---
oot/d2fc9f48-c166-4a9e-9868-133a1db7af88/llvm-project/build# ninja clang
check-clang
[100/845] Building CXX object
tools/clang/lib/Serialization/CMakeFiles/obj.clangSerialization.dir/GlobalModuleIndex.cpp.o
FAILED:
too
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111393
--- Comment #3 from AK ---
gcc -v
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/riscv64-linux-gnu/13/lto-wrapper
Target: riscv64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 13.1.0-6'
--with-bugurl=file:///usr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111393
--- Comment #5 from AK ---
Created attachment 55890
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55890&action=edit
GlobalModuleIndex.cpp preprocessed files
Everytime the crash is in a different file. it could be just because of memory
i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111393
--- Comment #8 from AK ---
> this does seem like a HW issue. Are you sure you have a decent RISCV machine
> without any memory issues?
> I suspect ninja is building with all of the cores which pushes the memory
> usage high.
possible. I have
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111393
--- Comment #9 from AK ---
i think it is okay to close this bug as this doesn't seem to be related to gcc.
ormal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
CGBuiltin.cpp:(.text._ZN5clang7CodeGen15CodeGenFunction20EmitRISCVBuiltinExprEjPKNS_8CallExprENS0_15ReturnValueSlotE+0x10d0):
reloc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111420
--- Comment #1 from AK ---
I got this error while building clang (ninja clang) on a riscv machine.
root@lpi4a:~# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/riscv64-linux-gnu/13/lto-wrapper
Target: riscv64-
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111420
--- Comment #4 from AK ---
good catch. By mistake i built at -O0, i wanted to build at -O3.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111420
AK changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111420
--- Comment #6 from AK ---
To confirm what Andrew mentioned, the release build (-O3) built successfully.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108915
--- Comment #6 from AK ---
For reference, I had opened a related bug in clang:
https://github.com/llvm/llvm-project/issues/60967
: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
#include
#include
using namespace std;
bool bar();
using T = int;
T vat(std::vector v) {
T s;
for
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hiraditya at msn dot com
Target Milestone: ---
Reference: https://godbolt.org/z/af4x6zhz9
When all elements of vector are 0, then the compiler should be able to remove
the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109441
--- Comment #1 from AK ---
I guess a better test case is this:
#include
using namespace std;
using T = int;
T v(std::vector v) {
T s;
std::fill(v.begin(), v.end(), T());
for (auto i = 0; i < v.size(); ++i) {
s += v[i];
1 - 100 of 122 matches
Mail list logo