[Bug c++/115091] New: Support value speculation in frontend

2024-05-14 Thread andi-gcc at firstfloor dot org via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- This blog post describes an interesting optimization technique for memory access. https://mazzo.li/posts/value-speculation.html A linked list walk is often be limited

[Bug gcov-profile/113765] ICE: autofdo: val-profiler-threads-1.c compilation, error: probability of edge from entry block not initialized

2024-02-05 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113765 --- Comment #3 from Andi Kleen --- -O1 fixes it, so an easy patch would be diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index 63d0c3dc36df..180ed7a8260f 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -1758,7 +1758,7

[Bug gcov-profile/113765] autofdo: val-profiler-threads-1.c compilation, error: probability of edge from entry block not initialized

2024-02-05 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113765 --- Comment #1 from Andi Kleen --- Seems to be a regression, I tested the same setup on gcc 13 and the test passes there: 55:PASS: gcc.dg/tree-prof/val-profiler-threads-1.c compilation, -fprofile-generate -D_PROFILE_GENERATE 59:PASS:

[Bug gcov-profile/113765] New: autofdo: val-profiler-threads-1.c compilation, error: probability of edge from entry block not initialized

2024-02-05 Thread andi-gcc at firstfloor dot org via Gcc-bugs
: UNCONFIRMED Severity: normal Priority: P3 Component: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- With recent trunk (019dc63819be) When running the test suite on a Intel

[Bug lto/107779] Support implicit references from inline assembler to compiler symbols

2023-10-15 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107779 --- Comment #4 from Andi Kleen --- This whole manual annotation idea (which is equivalent to marking the symbols global and visible and that is what a large part of the kernel LTO patchkit) is dead on arrival because the kernel people already

[Bug middle-end/111743] shifts in bit field accesses don't combine with other shifts

2023-10-09 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111743 --- Comment #5 from Andi Kleen --- config/i386/i386.h:#define SLOW_BYTE_ACCESS 0 You mean it doesn't define it?

[Bug middle-end/111743] shifts in bit field accesses don't combine with other shifts

2023-10-09 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111743 --- Comment #2 from Andi Kleen --- Okay then it doesn't understand that SHL_signed and SHR_unsigned can be combined when one the values came from a shorter unsigned.

[Bug middle-end/111743] New: shifts in bit field accesses don't combine with other shifts

2023-10-09 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- (not sure it's the middle-end, picked arbitrarily) The following code struct bf { unsigned a : 10, b : 20, c : 10

[Bug lto/107779] New: Support implicit references from inline assembler to compiler symbols

2022-11-20 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org, mliska at suse dot cz Target Milestone: --- Created

[Bug lto/107014] flatten+lto fails the kernel build

2022-09-25 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107014 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug preprocessor/45227] libcpp Makefile does not enable instrumentation

2022-01-04 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45227 --- Comment #5 from Andi Kleen --- I think it was the method from the info file. But I can't quite remember. If you cannot reproduce it I guess it's ok to close. Maybe I made some mistake.

[Bug middle-end/99578] gcc-11 -Warray-bounds or -Wstringop-overread warning when accessing a pointer from integer literal

2021-05-01 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug lto/99828] inlining failed in call to ‘always_inline’ ‘memcpy’: --param max-inline-insns-auto limit reached

2021-03-30 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99828 --- Comment #3 from Andi Kleen --- So what do you want to fix in the kernel? Use a wrapper for taking the address of the memcpy? (I hope nothing in gcc would remove such a wrapper)

[Bug lto/95928] LTO through ar breaks weak function resolution

2020-06-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928 --- Comment #12 from Andi Kleen --- Okay. I only compared gcc-7 (working) vs gcc-9 (broken), but always with LTO. Looking at the kernel link it also uses --whole-archive. Perhaps that makes a difference? I'll redo the test case with

[Bug lto/95928] LTO through ar breaks weak function resolution

2020-06-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928 --- Comment #9 from Andi Kleen --- I think the STB_SECONDARY stuff is only needed if ld -r is used, but not for ar

[Bug lto/95928] LTO through ar breaks weak function resolution

2020-06-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928 --- Comment #8 from Andi Kleen --- It works fine without LTO. Otherwise the Linux kernel wouldn't work. It relies on this behavior for its syscalls. The test case is extracted from there.

[Bug lto/95928] LTO through ar breaks weak function resolution

2020-06-26 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928 --- Comment #5 from Andi Kleen --- It doesn't seem to be the plugin itself, I compiled trunk with the gcc-7 lto-plugin.c and it fails too.

[Bug lto/95928] LTO through ar breaks weak function resolution

2020-06-26 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928 --- Comment #4 from Andi Kleen --- Reproduced on trunk too 11.0-200626 e74c281bf4955eea7fdc5f21b43e29fa0235a5b0

[Bug bootstrap/95934] New: bootstrap fails in compiler assert in sanitizer_platform_limits_posix.cpp:1136

2020-06-26 Thread andi-gcc at firstfloor dot org
: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- commit e74c281bf4955eea7fdc5f21b43e29fa0235a5b0 (HEAD -> trunk, origin/trunk, origin/master, origin/HEAD) m

[Bug lto/95928] LTO through ar breaks weak function resolution

2020-06-26 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928 --- Comment #3 from Andi Kleen --- Versions reproduced: gcc version 10.1.1 20200507 [revision dd38686d9c810cecbaa80bb82ed91caaa58ad635] (SUSE Linux) gcc-9 (SUSE Linux) 9.3.1 20200406 [revision 6db837a5288ee3ca5ec504fbd5a765817e556ac2]

[Bug lto/95928] LTO through ar breaks weak function resolution

2020-06-26 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928 --- Comment #1 from Andi Kleen --- Created attachment 48792 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48792=edit sys_ni.i

[Bug lto/95928] LTO through ar breaks weak function resolution

2020-06-26 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95928 --- Comment #2 from Andi Kleen --- Created attachment 48793 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48793=edit capability.i

[Bug lto/95928] New: LTO through ar breaks weak function resolution

2020-06-26 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: marxin at gcc dot gnu.org Target Milestone: --- Target: x86_64-linux Created attachment 48791 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48791=e

[Bug target/93346] gcc not generate BZHI

2020-01-20 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93346 --- Comment #1 from Andi Kleen --- typedef unsigned u; u bzhi(u src, u inx) { return src & ((1 << inx) - 1); } with -O2 -march=skylake generates movl%esi, %r8d movl$1, %esi shlx%r8d, %esi, %esi

[Bug target/93346] New: gcc not generate BZHI

2020-01-20 Thread andi-gcc at firstfloor dot org
: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Target: x86_64

[Bug inline-asm/89839] New: section not reset to text for top level asm

2019-03-26 Thread andi-gcc at firstfloor dot org
: inline-asm Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- The ELF section from the previous function doesn't get reset before top level asm statements: e.g. __attribute__((section("foo"))) void func(void) { } a

[Bug testsuite/86404] UNRESOLVED/UNSUPPORTED gcov test results due to Permission error mapping pages

2019-02-05 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86404 --- Comment #4 from Andi Kleen --- Does something like this help? (untested, cut-n-pasted, possibly with other values) iff --git a/gcc/config/i386/gcc-auto-profile b/gcc/config/i386/gcc-auto-profile index 5da5c63cd845..8744b9f091df 100755 ---

[Bug target/88622] ICE when changing -mpreferred-stack-boundary for different files with LTO

2018-12-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88622 --- Comment #4 from Andi Kleen --- Ok that means that this code you pasted in ix86_option_override_internal somehow doesn't get executed correctly for LTO switching between different options. Adding Honza.

[Bug target/88622] ICE when changing -mpreferred-stack-boundary for different files with LTO

2018-12-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88622 Andi Kleen changed: What|Removed |Added CC||hubicka at gcc dot gnu.org --- Comment #3

[Bug target/88622] ICE when changing -mpreferred-stack-boundary for different files with LTO

2018-12-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88622 Andi Kleen changed: What|Removed |Added Target||x86_64-linux CC|

[Bug target/88622] New: ICE when changing -mpreferred-stack-boundary for different files with LTO

2018-12-27 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: ---

[Bug c/88583] New: -Wpacked-not-aligned shouldn't be in -Wall

2018-12-23 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- gcc 9 added -Wpacked-not-aligned to Wall. In Linux kernel builds this warning is very noisy. There's a Linux kernel patch now to disable it. But I suspect other software using

[Bug middle-end/88573] 9 regression: error: type mismatch in component reference

2018-12-21 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88573 --- Comment #1 from Andi Kleen --- Created attachment 45281 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45281=edit test case (unminimized) gcc-9 -O2 -S -flto arch/x86/events/intel/pt.i /home/ak/lsrc/linux/arch/x86/events/intel/pt.c: In

[Bug middle-end/88573] New: 9 regression: error: type mismatch in component reference

2018-12-21 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Don't have a small test case currently, happens during a large LTO Linux kernel build. With gcc trunk (20181222) with checking enabled

[Bug sanitizer/88277] ASAN stack poisoning is using unaligned stores on e.g. x86_64

2018-11-30 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88277 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug ipa/88231] aligned functions laid down inefficiently

2018-11-29 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88231 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug target/88096] wrong inline AVX512F optimization

2018-11-28 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88096 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug target/88195] New: misleading error message for unsupported builtin

2018-11-25 Thread andi-gcc at firstfloor dot org
: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Target: x86_64 On x86, when using a builtin that is not supported by the target configuration, e.g. gcc -c -m32 -ptwrite t.c.c with t.c being void f(void

[Bug tree-optimization/42587] bswap not recognized for memory

2018-11-19 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42587 --- Comment #11 from Andi Kleen --- Only when the first test case is fixed too

[Bug c/61727] #pragma simd is undocumented

2018-11-15 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61727 --- Comment #4 from Andi Kleen --- This was originally about the #pragma simd in CIlk+, which has been removed. But it lives on in #pragma omp simd

[Bug lto/83375] partitioner partitions static arrays with label references

2018-10-10 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83375 --- Comment #6 from Andi Kleen --- This breaks Linux kernel LTO builds. I currently have a workaround (disabling LTO for that file), but I don't think your "is not common" argument is valid.

[Bug other/50639] -flto=jobserver broken on large LTO build

2018-04-19 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50639 --- Comment #4 from Andi Kleen --- I doubt it's fixed. It's a race so can be unstable. Especially since judging from the growing cc list other people keep seeing it It may not be something that gcc can fix, if anything it's more likely in make

[Bug other/50639] -flto=jobserver broken on large LTO build

2018-04-18 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50639 --- Comment #2 from Andi Kleen --- FWIW the problem disappeared for me at some point (could have been newer kernel or different make). I don't see it anymore. I think it was some problems with the pipes used by the job server losing a token

[Bug c/83397] void f() { } has zero arguments

2017-12-12 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83397 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug ipa/83346] inliner crash with attribute always_inline/flatten on a destructor

2017-12-12 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83346 --- Comment #3 from Andi Kleen --- Fixed by https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00764.html

[Bug lto/83388] New: reference statement index not found error with -fsanitize=null

2017-12-11 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 42844 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42844=e

[Bug lto/83376] ICE in LTO streamer

2017-12-11 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83376 Andi Kleen changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug lto/83380] New: disk full while writing LTO files leads to ICE

2017-12-11 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: marxin at gcc dot gnu.org Target Milestone: --- lto1: fatal error: error writing to vmlinux.ltrans15.s: No space left on device gcc: internal compiler error: Aborted signal

[Bug gcov-profile/83355] autofdo g++.dg/bprob/g++-bprob-1.C FAILS with ICE

2017-12-11 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83355 --- Comment #3 from Andi Kleen --- patch checked in

[Bug lto/83376] New: ICE in LTO streamer

2017-12-11 Thread andi-gcc at firstfloor dot org
: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: marxin at gcc dot gnu.org Target Milestone: --- Don't have a small test case right now, but will bisect When building Linux kernel LTO with gcc 8 I currently get an ICE. Doesn't happen on 7 and I think

[Bug lto/83375] partitioner partitions static arrays with label references

2017-12-11 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83375 --- Comment #1 from Andi Kleen --- Actually -flto-partition=max

[Bug lto/83375] New: partitioner partitions static arrays with label references

2017-12-11 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 42842 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42842=edit t

[Bug gcov-profile/83355] New: autofdo g++.dg/bprob/g++-bprob-1.C FAILS with ICE

2017-12-10 Thread andi-gcc at firstfloor dot org
: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: marxin at gcc dot gnu.org Target Milestone: --- Running in gdb shows that there is a very deep recursion in get_index_by_decl until it overflows the stack

[Bug ipa/83346] inliner crash with always inline and templates

2017-12-09 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83346 --- Comment #1 from Andi Kleen --- This fixes it. Don't know why that node has no decl. Will submit after a test cycle. diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 7846e93d119..dcd8a3de1ac 100644 --- a/gcc/ipa-inline.c +++

[Bug ipa/83346] New: inliner crash with always inline and templates

2017-12-09 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 42820 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42820=edit test case Attached test c

[Bug target/83052] [8 Regression] ICE in extract_insn, at recog.c:2305 starting from r254560

2017-11-20 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83052 --- Comment #1 from Andi Kleen --- I'm not sure why you call it a regression? You must be running the test suite manually with the new option. I haven't tested, but likely it will fail if you run that test with -mcmodel=large too. The

[Bug tree-optimization/82854] New: more missing simplifcations

2017-11-05 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- These all come from a paper "Optgen: A Generator for Local Optimizations" (Buchwald et.al.). https://pp.info.uni-karlsruhe.de/uploads/publikationen/buchwald15cc.pdf

[Bug tree-optimization/82854] more missing simplifcations

2017-11-05 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82854 --- Comment #1 from Andi Kleen --- Also I suppose a lot of them could be generalized to 8/16/64bit.

[Bug middle-end/82853] Optimize x % 3 == 0 without modulo

2017-11-05 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853 --- Comment #8 from Andi Kleen --- I'm not sure if it works with other numbers too. (need to dig through Hacker's delight & Matters Computational to see if they have anything on it) But it could be extended for other word lengths at least BTW

[Bug middle-end/82853] Optimize x % 3 == 0 without modulo

2017-11-05 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853 --- Comment #5 from Andi Kleen --- Also I'm not sure why you would want it in the middle end. It should all work at the tree level

[Bug middle-end/82853] Optimize x % 3 == 0 without modulo

2017-11-05 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82853 --- Comment #4 from Andi Kleen --- Right it's about special casing the complete expression

[Bug tree-optimization/82853] New: Optimize x % 3 == 0 without modulo

2017-11-05 Thread andi-gcc at firstfloor dot org
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Ralph Levien pointed out as part of FizzBuzz optimization: Turns out you can compute x%3 == 0 with even fewer steps, it's (x*0xb) < 0x5556 (assuming wrapp

[Bug other/82784] Remove semicolon after "do {} while (0)" macros

2017-11-04 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82784 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug c/82013] New: better error message for missing semicolon in prototype

2017-08-28 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- gcc gives quite poor error messages when forgetting a semicolon after a prototype (common mistake when cut'n'pasting a function definition

[Bug target/80742] New: attribute target no- does not work

2017-05-14 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Disabling ISAs with attribute target doesn't seem to work on x86_64 e.g. typedef float __m128 __attribute__ ((vector_size (16))); __attribute__((target("no-sse2"))) _

[Bug testsuite/79067] gcc.dg/tree-prof/cold_partition_label.c runs a million times longer than it used to and times out

2017-05-10 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79067 --- Comment #3 from Andi Kleen --- sandra, does this patch fix it? diff --git a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c index 6214e3629f2..924a270e1bd 100644 ---

[Bug testsuite/79067] gcc.dg/tree-prof/cold_partition_label.c runs a million times longer than it used to and times out

2017-05-10 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79067 --- Comment #2 from Andi Kleen --- There's a separate fix for the random failures (or w/a increase /proc/sys/kernel/perf_event_mlock_kb), see PR 77684 Not running the test on systems without FDO seems best. I don't think it does anything useful

[Bug testsuite/77684] many tree-prof testsuite failures in parallel make check

2017-05-10 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77684 --- Comment #5 from Andi Kleen --- Created attachment 41337 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41337=edit limit perf buffer size This patch allows parallelism upto 16 with the default setting. Currently testing

[Bug testsuite/77684] many tree-prof testsuite failures in parallel make check

2017-05-05 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77684 --- Comment #4 from Andi Kleen --- Thanks for tracing that down. So perf runs out of memory for the locked trace buffers Increasing the limit is a good workaround ulimit -l may also work, but also needs root. We could just pass a smaller -m

[Bug c/80378] Extend alloc_size attribute for better Linux kernel checking

2017-04-24 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80378 --- Comment #8 from Andi Kleen --- __builtin_constant_p does not cover variable range information, which is what we're looking for here to prevent security bugs. Also in my experience these explicit expressions tend to be somewhat fragile and

[Bug c/80378] Extend alloc_size attribute for better Linux kernel checking

2017-04-24 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80378 --- Comment #6 from Andi Kleen --- In the kernel there is also an upper limit on allocations. Perhaps just a generic assert builtin that: - uses value range information - uses constant propagation - is a nop when the compiler doesn't have

[Bug c/80378] Extend alloc_size attribute for better Linux kernel checking

2017-04-24 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80378 --- Comment #4 from Andi Kleen --- I tested it now and the inline trick doesn't work. Here's a test case extern void *do_alloc(int a, int b); static inline __attribute__((alloc_size(1))) void check_alloc_size(int size) { } static inline void

[Bug c/80378] Extend alloc_size attribute for better Linux kernel checking

2017-04-09 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80378 --- Comment #3 from Andi Kleen --- Hmm, that trick may work for the shift too. Let me try.

[Bug c/80378] Extend alloc_size attribute for better Linux kernel checking

2017-04-09 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80378 --- Comment #1 from Andi Kleen --- Small correction: argument 4 would need to be a constant for shifted by.

[Bug lto/80379] New: Redundant note: code may be misoptimized unless -fno-strict-aliasing is used

2017-04-09 Thread andi-gcc at firstfloor dot org
: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- I get an extra note: code may be misoptimized unless -fno-strict-aliasing is used note for type mismatches in LTO

[Bug c/80378] New: Extend alloc_size attribute for better Linux kernel checking

2017-04-09 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- I've been adding alloc_size attributes to the Linux kernel allocators. However there are some allocator patterns that can currently

[Bug lto/60016] gcc-nm does not report static symbols

2016-09-12 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60016 --- Comment #2 from Andi Kleen --- This is needed for example to generate backtraces, if the symbol table should be built in instead of read from the binary. The Linux kernel cannot read its own binary, so the symbol table has to built in.

[Bug gcov-profile/71672] New: inlining indirect calls does not work with autofdo

2016-06-27 Thread andi-gcc at firstfloor dot org
: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- The current mainline version of autofdo doesn't inline indirect calls based on profiling data. I instrumented a bootstrap and it never triggers. gcc.dg/tree

[Bug target/71659] New: _xgetbv intrinsic missing

2016-06-25 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- icc and microsoft have a _xgetbv intrinsic for the XGETBV instruction, which is needed to check if AVX or MPX are supported by the kernel. gcc is missing an intrinsic for that, so

[Bug c/70618] New: better error messages for missing/too many arguments

2016-04-10 Thread andi-gcc at firstfloor dot org
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- When doing API refactorings it is reasonable common to have too many or not enough arguments in function calls. The existing errors in gcc/g++ are not very good

[Bug tree-optimization/70427] autofdo bootstrap generates wrong code

2016-03-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70427 --- Comment #3 from Andi Kleen --- Analyzing the code more it looks like the compiler generates it correctly, the edge returned should not be 0 here.

[Bug tree-optimization/70427] autofdo bootstrap generates wrong code

2016-03-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70427 --- Comment #2 from Andi Kleen --- Created attachment 38110 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38110=edit somewhat reduced input file, only single function

[Bug tree-optimization/70427] autofdo bootstrap generates wrong code

2016-03-27 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70427 --- Comment #1 from Andi Kleen --- Created attachment 38109 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38109=edit ipa-profile input Here's the source of the miscompiled file from the compiler cc1plus -O2 ipa-profile.i -S

[Bug tree-optimization/70427] New: autofdo bootstrap generates wrong code

2016-03-27 Thread andi-gcc at firstfloor dot org
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- I've been working on building gcc with an autofdo bootstrap. Currently I always run into an crash while rebuilding tree.c with the stage2 compiler and the autofdo

[Bug c/28901] -Wunused-variable ignores unused const initialised variables

2015-11-30 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901 --- Comment #17 from Andi Kleen --- There were a few false or useless ones (e.g. related to macros and specific build configs). I didn't look through them all, but various were semi legitimate, but also very minor (small) so fixing it won't

[Bug c/28901] -Wunused-variable ignores unused const initialised variables

2015-11-29 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28901 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug target/68602] New: i386: -mtune/arch options not all output by -v --help

2015-11-28 Thread andi-gcc at firstfloor dot org
Component: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- gcc -v --help does not output all the possible options for -mtune=/-march= For example corei7-avx is missing for arch, which is Sandy Bridge. tune is also mising

[Bug lto/66229] LTO fails with -fauto-profile on mcf

2015-11-28 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66229 --- Comment #2 from Andi Kleen --- Some analysis of the problem: At the time cc1 is streaming out profile_data it is not set to anything in autofdo. So the LTO files contain all 0 profile data, which later causes the ICE here. Seems to be some

[Bug bootstrap/60946] Current 4.9 branch does not boot strap on FC20 with systemtap-devel installed

2015-09-28 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60946 Andi Kleen changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug bootstrap/60946] Current 4.9 branch does not boot strap on FC20 with systemtap-devel installed

2015-09-25 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60946 --- Comment #9 from Andi Kleen --- Created attachment 36391 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36391=edit workaround This workaround fixes it. Disable -gc-section for libstdc++. It seems like a linker bug. I opened a binutils

[Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels

2015-07-18 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676 --- Comment #6 from Andi Kleen andi-gcc at firstfloor dot org --- The patch doesn't seem to be checked in yet. Is there a reason for that?

[Bug rtl-optimization/66890] function splitting only works with profile feedback

2015-07-17 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66890 --- Comment #4 from Andi Kleen andi-gcc at firstfloor dot org --- Created attachment 36008 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36008action=edit Updated patch with documentation and param I updated the patch with proper

[Bug rtl-optimization/66890] function splitting only works with profile feedback

2015-07-16 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66890 --- Comment #3 from Andi Kleen andi-gcc at firstfloor dot org --- I suspect the patch may be too simple because it could get stuck in unlikely, but high frequency edges in the cold area. Perhaps need to adapt more of the code of the non

[Bug rtl-optimization/66890] function splitting only works with profile feedback

2015-07-16 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66890 --- Comment #2 from Andi Kleen andi-gcc at firstfloor dot org --- Created attachment 35993 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35993action=edit Potential patch This patch fixes the problem for my simple test case. It adds a fall

[Bug rtl-optimization/66890] function splitting only works with profile feedback

2015-07-15 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66890 --- Comment #1 from Andi Kleen andi-gcc at firstfloor dot org --- The problem seems to be that bb-reorder.c:find_rarely_executed_basic_blocks_and_crossing_edges returns no edges without profile feedback, which prevents generation of a section

[Bug rtl-optimization/66890] New: function splitting only works with profile feedback

2015-07-15 Thread andi-gcc at firstfloor dot org
Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Consider this simple example: volatile int count; int main() { int i; for (i = 0; i 10; i++) { if (i == 999

[Bug lto/61635] LTO partitioner does not handle label in statics

2015-03-29 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61635 --- Comment #7 from Andi Kleen andi-gcc at firstfloor dot org --- Still happens with current trunk and with newer LTO Linux kernels (4.0-rc*)

[Bug bootstrap/60946] Current 4.9 branch does not boot strap on FC20 with systemtap-devel installed

2015-03-29 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60946 --- Comment #8 from Andi Kleen andi-gcc at firstfloor dot org --- I still get that one with current trunk on my fedora 21 system.

[Bug c/65620] New: Incorrect warning for !! with -Wlogical-not-parentheses

2015-03-29 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Created attachment 35172 -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35172action=edit test case When building the linux 4.0-rc5 kernel with 5.0 there are several

[Bug bootstrap/65621] New: boot strap with checking enabled ICEs

2015-03-29 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org target: x86_64-linux ../../../../gcc/libstdc++-v3/libsupc++/tinfo.cc:82:1: internal compiler error: in mark_functions_to_output, at cgraphunit.c:1307 } ^ 0xb25f0b mark_functions_to_output

  1   2   3   4   5   >