[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 --- a/

[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 f

[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
nt: c 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 soft

[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&action=edit test case (unminimized) gcc-9 -O2 -S -flto arch/x86/events/intel/pt.i /home/ak/lsrc/linux/arch/x86/events/intel/pt

[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 en

[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&

[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 a

[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&acti

[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. This

[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 +++ b/gcc/ipa-

[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&action=edit test case Attached te

[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 -mforce-i

[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

[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 definit

[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 --- a/gcc/testsu

[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&action=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 v

[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 is

[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 either

[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 n

[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-26 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

[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 for

[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&action=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&action=edit ipa-profile input Here's the source of the miscompiled file from the compiler cc1plus -O2 ipa-profile.i -S unfo

[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 au

[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 help

[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 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 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 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&action=edit workaround This workaround fixes it. Disable -gc-section for libstdc++. It seems like a linker bug. I opened a bi

[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 --- 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 --- Created attachment 36008 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36008&action=edit Updated patch with documentation and param I updated the patch with proper documentation and a param for the cut o

[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 --- 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 partitioning reordering

[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 --- Created attachment 35993 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35993&action=edit Potential patch This patch fixes the problem for my simple test case. It adds a fall back path to the partition c

[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 --- 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 split note.

[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 ==

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

2015-03-29 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65621 Andi Kleen changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[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

[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=35172&action=edit test case When building the linux 4.0-rc5 kernel with 5.0 th

[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 --- I still get that one with current trunk on my fedora 21 system.

[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 --- Still happens with current trunk and with newer LTO Linux kernels (4.0-rc*)

[Bug ipa/64963] [5 Regression] IPA Cloning/Splitting does not copy function section attributes resulting in kernel miscompilation

2015-02-10 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64963 --- Comment #10 from Andi Kleen --- Yes it has to be fixed. For example with the kernel __kprobes attribute it could cause a real bug (__kprobes marks function that cannot be safely instrumented) We shouldn't inline over different section names

[Bug ipa/64963] IPA Cloning/Splitting does not copy function section attributes resulting in kernel miscompilation

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

[Bug tree-optimization/64130] vrp: handle non zero constant divided by range cannot be zero.

2014-11-30 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64130 --- Comment #3 from Andi Kleen --- You're right. I actually meant x >= maxval(typeof(a)), x / a cannot be 0. Corrected test case (assuming 64bit target): #include int fsigned(int a) { return 0x1fffL / a == 0; } int funsigned(u

[Bug tree-optimization/64130] New: vrp: handle non zero constant divided by range cannot be zero.

2014-11-30 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org The following two functions should always be optimized to return 0 because x > 0, x / a cannot be 0. But VRP misses this case for unkn

[Bug bootstrap/63933] Build stage1 with -O2 during bootstrap if host compiler is a recent gcc version

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

[Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization

2014-11-18 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63844 --- Comment #13 from Andi Kleen --- >I think aggregate IPA-CP does that, IPA-SRA cannot as the function has >its address taken. Perhaps that case (only passing address to gomp runtime) could be special cased in the escape analysis.

[Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization

2014-11-18 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63844 --- Comment #12 from Andi Kleen --- Yes should have been omp parallel for

[Bug tree-optimization/63844] [4.8/4.9/5 Regression] open mp parallelization prevents vectorization

2014-11-17 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63844 --- Comment #4 from Andi Kleen --- I had a typo in the test case (remove += to make the loops identical) #define N 1000 int a[N], b[N], c[N]; main() { int i; #pragma omp parallel num_threads(4) for (i = 0; i < N; i++) {

[Bug tree-optimization/63844] open mp parallelization prevents vectorization

2014-11-17 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63844 --- Comment #2 from Andi Kleen --- Regression, doesn't happen on 4.8

[Bug tree-optimization/63844] New: open mp parallelization prevents vectorization

2014-11-12 Thread andi-gcc at firstfloor dot org
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org #define N 1000 int a[N], b[N], c[N]; main() { int i; #pragma omp parallel num_threads(4) for (i = 0; i < N; i++) { a[i] = b[i] +

[Bug c/60804] Another CilkPlus ICE in gimplify_expr, at gimplify.c:8335

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

[Bug target/63672] New: xbegin/xend/xabort missing memory barriers

2014-10-28 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Created attachment 33835 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33835&action=edit proposed patch adding barriers No test case currently, but we got a report that the builtins

[Bug middle-end/63556] gcc should dedup string postfixes

2014-10-16 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63556 Andi Kleen changed: What|Removed |Added Severity|normal |enhancement

[Bug middle-end/63556] New: gcc should dedup string postfixes

2014-10-16 Thread andi-gcc at firstfloor dot org
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org With this code: extern void func(char *a, char *b); void f(void) { func("abc", "xabc"); func("abc", "abc"); } we get: .LC0: .strin

[Bug c/63543] New: incomplete type error should suppress duplicates

2014-10-15 Thread andi-gcc at firstfloor dot org
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org For a test case like this struct undefined; int f(struct undefined *f) { int x = f->a; return x + f->a + f->b; } tmissing-type.c: In function 'f': tmissing

[Bug lto/61969] [4.8/4.9/5 Regression] wrong code by LTO on i?86-linux-gnu (affecting trunk, 4.9.x, and 4.8.x)

2014-10-07 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61969 --- Comment #9 from Andi Kleen --- Patch fixes the test case.

[Bug lto/61969] [4.8/4.9/5 Regression] wrong code by LTO on i?86-linux-gnu (affecting trunk, 4.9.x, and 4.8.x)

2014-10-07 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61969 --- Comment #6 from Andi Kleen --- I looked at this a bit more. It's definitely the nrv pass that causes the problem. When I disable it in the source code the 32bit version compiles correctly. I also tried disabling the next pass (cfgcleanup), b

[Bug libstdc++/63466] sstream is very slow

2014-10-06 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63466 --- Comment #2 from Andi Kleen --- Looking at the profile there's plenty of room for optimization. e.g. not using getc/ungetc, but directly accessing the buffer, or maybe even some kind of template specialization. With the variables pulled out i

[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-06 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467 --- Comment #6 from Andi Kleen --- For the marker case it's enough if it just stays in the same position in the basic block and does get duplicated if the BB gets too. That's somewhat special semantics, that is why I think it would need some way

[Bug tree-optimization/63467] should have asm statement that does not prevent vectorization

2014-10-06 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63467 --- Comment #2 from Andi Kleen --- It's the same with asm("" :::); At least the vectorizer bombs out on any asm.

[Bug tree-optimization/63467] New: should have asm statement that does not prevent vectorization

2014-10-06 Thread andi-gcc at firstfloor dot org
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Currently any inline asm statement in a loop prevents vectorization, like #define N 100 int a[N], b[N], c[N]; main() { int i

[Bug libstdc++/63466] New: sstream is very slow

2014-10-06 Thread andi-gcc at firstfloor dot org
: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org sstream is very slow. Comparing two simple programs that parse a stream with C and with sstream. The sstream version is an order of magnitude slower. gcc version 4.9.1 20140423 (prerelease) (GCC) # C++ % time

[Bug c/63462] [RFC] gcc should prevent from overwriting source file

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

[Bug c/61898] Variadic functions accept va_list without warning

2014-10-04 Thread andi-gcc at firstfloor dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61898 --- Comment #4 from Andi Kleen --- The patch has several issues (making it currently fail bootstrap): - it warns for vfprintf too (fixed) - on i386 it gets confused between va_list * and char *, so something like char *format; char buf[100]; p

[Bug c/63450] Optimizing -O3 generates rep ret on an almost empty function

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

<    1   2   3   4   5   6   >