https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68901
--- Comment #7 from krux ---
Created attachment 46435
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46435&action=edit
cleanup
The previous patch should also allow removing these hacks (untested).
Though TYPE_ARTIFICIAL wasn't set in any o
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68901
--- Comment #6 from krux ---
Created attachment 46434
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46434&action=edit
proposed patch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68901
--- Comment #5 from krux ---
Wpadded only checks for input_location != BUILTINS_LOCATION currently
(stor-layout.c).
Maybe something like !DECL_ARTIFICIAL(rli->t) should be added there.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #34 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90523
krux changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87076
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #5 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52981
--- Comment #7 from krux ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68901
is an example of missed -Wpadded suppression.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68901
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #3 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52981
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #6 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90441
--- Comment #24 from krux ---
objdump -dCrS also prints these errors.
It definitely fails to find the entry for main which is present according to
objdump --dwarf:
<1>: Abbrev Number: 8 (DW_TAG_subprogram)
DW_AT_external: 1
DW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90441
--- Comment #23 from krux ---
But it's so fragile, touch any part of the code and the error disappears.
Like change serial3_available to void and you also get an additional symbol:
4160 0003 T mainmain.cpp:8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90441
--- Comment #22 from krux ---
I can also reproduce it without any linker script, simplified code:
int serial3_available() {}
struct HardwareSerial3 {
int available() { serial3_available(); }
};
HardwareSerial3 Serial3;
void yield()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90441
--- Comment #20 from krux ---
Thanks your patch worked!
Just fyi: llvm-dwarfdump doesn't understand call-site info:
https://bugs.llvm.org/show_bug.cgi?id=41846
Not sure if it's relevant.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88013
--- Comment #9 from krux ---
(In reply to ktkachov from comment #7)
> I tried current trunk (future GCC 9)
> GCC 9 learned to avoid excessive widening during vectorisation, which is
> what accounts for the large number of instructions you see.
C
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90523
--- Comment #3 from krux ---
Possible, gcc was built with --disable-multilib --with-arch=armv7e-m
--with-mode=thumb --with-float=soft.
And if I replace -mcpu=cortex-m4 with -march=armv7e-m in my test command
there's no crash.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90523
--- Comment #1 from krux ---
So this one must be null:
https://github.com/gcc-mirror/gcc/blob/65af043/gcc/config/arm/arm.c#L3148
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Built a bleeding-edge arm-gcc toolchain. It works fine but when I tried newlib
built with -flto I got a crash in lto1.
$ arm-none
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90441
--- Comment #18 from krux ---
(In reply to Iain Sandoe from comment #14)
> current trunk (27), manual regeneration of the
> firmware.elf.ltrans0.ltrans.o ->
>
> (it's kinda frustrating that one can't see the link line, more tweaks are
> stil
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90441
--- Comment #3 from krux ---
Finally tried qemu+gdb on the original code:
gdb-8.2.1/gdb/dwarf2read.c:9715: internal-error: void
dw2_add_symbol_to_list(symbol*, pending**): Assertion `(*listhead) == NULL ||
(SYMBOL_LANGUAGE ((*listhead)->symbol[0]
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
Just using a dummy source:
extern "C"
void _start()
{}
$ arm-none-eabi-g++ -O3 -flto=2 main.cpp -nostdlib -o firmw
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90441
--- Comment #2 from krux ---
By the way, with 8.3 there is no DWARF error, but nm -l does not show any file
location for _VectorsFlash either.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90441
--- Comment #1 from krux ---
Created attachment 46343
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46343&action=edit
llvm-dwarfdump --verify output
FWIW llvm-dwarfdump --verify shows the same errors for both versions, but for
gcc-9 it ca
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
Originally occurred with arm-gcc 9.1
Reproduced it with Ubuntu 19.04 gcc 9.0, works with gcc 8.3.
Couldn't reduce it further.
mk20dx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90369
--- Comment #4 from krux ---
The code was automatically reduced, hence the empty linker script.
Looks promising, seems like you found the cause.
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Tested this ARM toolchain:
http://www.freddiechopin.info/en/download/category/11-bleeding-edge-toolchain
In a very specific case I get the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63149
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #3 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88566
--- Comment #1 from krux ---
Even simpler example:
uint8_t foo(uint8_t pin)
{
return pin > 0 ? pin - 1 : 0;
}
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
https://godbolt.org/z/p0RMde
unsigned char foo(uint8_t pin)
{
if (pin >= 3 && pin <= 6) return pin - 2;
if (pin >= 9 && pin <= 10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88534
--- Comment #2 from krux ---
The code is based on
https://github.com/hanickadot/compile-time-regular-expressions/blob/master/include/ctll/fixed_string.hpp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88534
krux changed:
What|Removed |Added
Keywords||ice-on-valid-code
--- Comment #1 from krux ---
h
: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
#include
#include
#include
template class basic_fixed_string
{
CharT content[N];
public:
using
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38658
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #5 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88440
--- Comment #3 from krux ---
Adding -ftree-loop-distribute-patterns to -Os does not seem to make a
difference though.
-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
https://godbolt.org/z/RTji7B
void foo(char* restrict dst, const char* buf) {
for (int i=0; i<8; ++i)
*dst++ = *buf++;
}
$ gcc -Os
$ gcc -O2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88013
--- Comment #6 from krux ---
-mfloat-abi=hard was missing indeed. It's a pity there's no warning like when
trying to use the intrinsics.
Still I see a lot more instructions, maybe that got fixed after v7.2?
https://godbolt.org/z/OWzgXi
vld3.8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88013
--- Comment #4 from krux ---
On x64 indeed both compilers generate a huge amount of code.
https://godbolt.org/z/TH7mqn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88013
--- Comment #3 from krux ---
A few NEON instructions are sufficient:
https://web.archive.org/web/20170227190422/http://hilbert-space.de/?p=22
clang seems to generate similar code, see the godbolt links.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88013
--- Comment #1 from krux ---
Something like -march=armv8-a -mfpu=neon-fp-armv8 does not work either.
https://godbolt.org/z/MpBQ0I
onent: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
#include
void reference_convert(uint8_t * __restrict dest, uint8_t * __restrict src, int
n)
{
for (int i=0; ihttps://godbolt.org/z/FPG3k_
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87656
--- Comment #5 from krux ---
I meant -Wshadow=local.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45615
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #2 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87656
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #3 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12849
krux changed:
What|Removed |Added
CC||hoganmeier at gmail dot com
--- Comment #5 from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50481
--- Comment #4 from krux ---
+1
The builtins already produce better code than a generic bitreverse
implementation:
https://godbolt.org/z/Um2Tit
But using special hardware instructions automatically is even more important
imho.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87913
--- Comment #2 from krux ---
The case of function g is quite interesting because of the data dependencies
and adc's latency:
https://godbolt.org/z/0V8Dlx
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87915
--- Comment #2 from krux ---
Yeah I'm using -fopt-info for manual performance analysis but that can't be
enabled in the normal build as it's too noisy.
Furthermore a proper warning can be turned into an error to ensure that
developer expectations
: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
When using #pragma omp simd for explicit vectorization shouldn't it warn if
vectorization failed?
clang has -Wpass-failed for that:
http://lists.llv
-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
$ gcc -fopenmp-simd -O3 -march=haswell -fopt-info-vec-omp-optimized-missed
template
T reverseBits(T x)
{
unsigned int s = sizeof(x) * 8;
T mask = ~T(0
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
unsigned int f(unsigned int num)
{
return num < 1 ? 1 : num;
}
int f2(int num)
{
return num < 1 ? 1 : num;
}
unsigned int g(unsigned int num)
{
return num
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
int pow(int x, unsigned int n)
{
int y = 1;
while (n > 1)
{
auto m = n%2;
n = n/2;
if (m)
y *= x;
x = x*x;
}
retur
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87621
--- Comment #3 from krux ---
Yes see the godbolt link.
clang compiles it down to a few vpmulld's.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84101
--- Comment #4 from krux ---
Also happens with pairs of floats:
https://godbolt.org/z/QrP0VD
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87621
--- Comment #1 from krux ---
Interestingly it happily unrolls the loop even with -fno-unroll-loops.
: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: hoganmeier at gmail dot com
Target Milestone: ---
https://godbolt.org/z/bgieBT
template
T pow(T x, unsigned int n)
{
if (!n)
return 1;
T y = 1;
while (n >
54 matches
Mail list logo