[committed] analyzer: warn on invalid shift counts [PR97424]

2020-11-11 Thread David Malcolm via Gcc-patches
This patch implements -Wanalyzer-shift-count-negative and -Wanalyzer-shift-count-overflow, analogous to the C/C++ warnings -Wshift-count-negative and -Wshift-count-overflow, but implemented via interprocedural path analysis rather than via parsing in a front end, and thus capable of detecting inter

[committed] analyzer: precision-of-wording for -Wanalyzer-stale-setjmp-buffer

2020-11-11 Thread David Malcolm via Gcc-patches
This patch adds a custom event to paths emitted by -Wanalyzer-stale-setjmp-buffer highlighting the place where the pertinent stack frame is popped, and updates the final event in the path to reference this. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as 8069928d

Re: [PATCH 2/2] reset edge probibility and BB-count for peeled/unrolled loop

2020-11-11 Thread Jiufu Guo via Gcc-patches
guojiufu writes: Hi Honza, all, Just want to ping this for review. Original messages: [PATCH 2/2] https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555872.html [PATCH 1/2] https://gcc.gnu.org/pipermail/gcc-patches/2020-October/555871.html Thanks, Jiufu Guo. > Hi, > PR68212 mentioned that

[PATCH] system: Add WARN_UNUSED_RESULT

2020-11-11 Thread Marek Polacek via Gcc-patches
I'd like to have the option of marking functions with __attribute__ ((__warn_unused_result__)), so this patch adds a macro. And use it for maybe_wrap_with_location, it's always a bug if the return value is not used, which happened to me and got me confused. Bootstrapped/regtested on x86_64-pc-linu

[pushed] dwarf2: Set DW_AT_declaration for undefined fns [PR97060]

2020-11-11 Thread Jason Merrill via Gcc-patches
If DECL_INITIAL isn't set, we can't emit anything about the body of the function, so add the declaration attribute. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/ChangeLog: PR debug/97060 * dwarf2out.c (gen_subprogram_die): It's a declaration if DECL_INITIAL isn't se

[Committed 1/2] IBM Z: Rename mode attr tointvec to TOINTVEC

2020-11-11 Thread Andreas Krebbel via Gcc-patches
Just a preparation to add a lower-case tointvec. Bootstrapped and regression tested on s390x. gcc/ChangeLog: * config/s390/vector.md: Rename tointvec to TOINTVEC. * config/s390/vx-builtins.md: Likewise. --- gcc/config/s390/vector.md | 142 -

[Committed 2/2] IBM Z: Fix PR97326: Enable fp compares in vec_cmp

2020-11-11 Thread Andreas Krebbel via Gcc-patches
Bootstrapped and regression tested on s390x. gcc/ChangeLog: PR target/97326 * config/s390/vector.md: Support vector floating point modes in vec_cmp. --- gcc/config/s390/vector.md | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/g

<    1   2