Re: [PATCH] lto: Stream edge goto_locus [PR94235]

2020-09-06 Thread Richard Biener
On Sat, 5 Sep 2020, Jakub Jelinek wrote: > Hi! > > The following patch adds streaming of edge goto_locus (both LOCATION_LOCUS > and LOCATION_BLOCK from it), the PR shows a testcase (inappropriate for > gcc testsuite) where the lack of streaming of goto_locus results in worse > debug info. > Earli

Patch for 96948

2020-09-06 Thread Kirill Müller via Gcc-patches
Hi As requested, attaching a patch for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96948. This solves a problem with _Unwind_Backtrace() on mingw64 + SEH. Best regards Kirill >From bbc163476cab9bcaaa044d8aa9ecee824f7284f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= D

[PATCH v2] rs6000: Expand vec_insert in expander instead of gimple [PR79251]

2020-09-06 Thread luoxhu via Gcc-patches
Hi, On 2020/9/4 18:23, Segher Boessenkool wrote: diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index 03b00738a5e..00c65311f76 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c /* Build *(((arg1_inner_type*)&(vector type){arg1})+arg2)

Re: [patch] Fortran: fix prototype of _gfortran_is_extension_of()

2020-09-06 Thread Thomas Koenig via Gcc-patches
Hi FX, Regtested on x86_64-apple-darwin19 and tested on aarch64-apple-darwin20. OK to commit? Looks good to me. Best regards Thomas

Re: *Ping*: [PATCH] PR fortran/96711 - ICE on NINT() Function

2020-09-06 Thread Thomas Koenig via Gcc-patches
Hi Harald, *ping* I don't really know about the convert vs. fold_convert issue either, but if it works, it works. Regarding the patch: Could you change the test caes into a run-time test and check for the results both for compile-time simplification and evaluation at run-time? Just to make s

[PATCH] aarch64: Add cpu cost tables for A64FX

2020-09-06 Thread Qian Jianhua
This patch add cost tables for A64FX. ChangeLog: 2020-09-07 Qian jianhua gcc/ * config/aarch64/aarch64-cost-tables.h (a64fx_extra_costs): New. * config/aarch64/aarch64.c (a64fx_addrcost_table): New. (a64fx_regmove_cost, a64fx_vector_cost): New. (a64fx_tunings): Us

Re: ubsan: d-demangle.c:214 signed integer overflow

2020-09-06 Thread Alan Modra via Gcc-patches
On Fri, Sep 04, 2020 at 06:23:10PM +0200, Iain Buclaw wrote: > If we're already using limits.h, I guess it should be fine to also add > > #define UINT_MAX ((unsigned) ~0U) Yes, except that I'll use the simpler fall-back #define UINT_MAX (~0U) The habit of using a cast for unsigned constants date

Re: Fortran: fix another function argtypes bug for ppc

2020-09-06 Thread FX via Gcc-patches
> OK (you can also put in a quick FIXME there). Actually the decl being declared is using itself as one of the arguments, so I think it’s on purpose that we don’t want to emit a full arglist here… to avoid recursion. So I’m not sure we would want to change that. FX

Re: Fortran: fix another function argtypes bug for ppc

2020-09-06 Thread Thomas Koenig via Gcc-patches
Hi FX, The patch is regtested on x86_64-apple-darwin19. I also tested it on aarch64-apple-darwin20, where it fixes wrong code issues in several testcases. OK (you can also put in a quick FIXME there). Best regards Thomas

Fortran: fix another function argtypes bug for ppc

2020-09-06 Thread FX via Gcc-patches
This is another function argtypes issue, very similar to This code from proc_ptr_comp_13.f90 : ! PR 40882: [F03] infinite recursion in gfc_get_derived_type with PPC returning derived type. ! At the same time, check that a formal argument does not cause infinite recursion (PR 40870

Re: [patch] Fortran: fix prototype for class vptr fields

2020-09-06 Thread FX via Gcc-patches
> Could you maybe put a FIXME at that place, explaining that we are > in fact following K&R conventions there and what we would need > to correc the function decl to use build_function_type_list? Done. FX

Re: [patch] Fortran: _gfortran_caf_fail_image() should have no argument

2020-09-06 Thread FX via Gcc-patches
> OK! Committed at https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=3489d80fee42764460cb06f7a2e9f126c18602b4 It’s my first commit since GCC moved to git, let me know if I did it correctly :) FX

Re: [patch] Fortran: _gfortran_caf_fail_image() should have no argument

2020-09-06 Thread Thomas Koenig via Gcc-patches
Hi FX, OK to commit? OK! Best regards Thomas

Re: [patch] Fortran: fix prototype for class vptr fields

2020-09-06 Thread Thomas Koenig via Gcc-patches
Am 06.09.20 um 13:12 schrieb FX via Fortran: Hi FX, OK to commit? The patch is OK in principle, I have also regtested it on POWER (which is also somethat picky about calling conventions). However, in an ideal world, this should only be a temporary fix. Could you maybe put a FIXME at that pl

[patch] Fortran: _gfortran_caf_fail_image() should have no argument

2020-09-06 Thread FX via Gcc-patches
Hi, The Fortran front-end, in gfc_trans_fail_image() emits a call to _gfortran_caf_fail_image with one argument (a NULL pointer): return build_call_expr_loc (input_location, gfor_fndecl_caf_fail_image, 1, build_int_cst (pchar_ty

[patch] Fortran: fix prototype of _gfortran_is_extension_of()

2020-09-06 Thread FX via Gcc-patches
Hi, The problem was reported in detail here: https://gcc.gnu.org/pipermail/fortran/2020-September/055005.html and in previous messages. When resolving select type constructs, the Fortran front-end is trying to use the _gfortran_is_extension_of() library call (which is also used for the EXTENDS

[PATCH] c++: Further tweaks for new-expression and paren-init [PR77841]

2020-09-06 Thread Marek Polacek via Gcc-patches
This patch corrects our handling of array new-expression with ()-init: new int[4](1, 2, 3, 4); should work even with the explicit array bound, and new char[3]("so_sad"); should cause an error, but we weren't giving any. Fixed by handling array new-expressions with ()-init in the same spot

[PATCH] doc: gcc.c: Update documentation for spec files

2020-09-06 Thread Armin Brauns via Gcc-patches
There were some differences between the actual code in do_spec_1, its source comment, and the documentation in doc/invoke.texi. These should now be resolved. gcc/ChangeLog: * gcc.c: document %T spec file directive * doc/invoke.texi: remove %p, %P spec file directives

[PATCH] gcov: fix TOPN streaming from shared libraries

2020-09-06 Thread Sergei Trofimovich via Gcc-patches
From: Sergei Trofimovich Before the change gcc did not stream correctly TOPN counters if counters belonged to a non-local shared object. As a result zero-section optimization generated TOPN sections in a form not recognizable by '__gcov_merge_topn'. The problem happens because in a case of mult

[patch] Fortran: fix prototype for class vptr fields

2020-09-06 Thread FX via Gcc-patches
Hi, Attached is a patch fixing the problem at: https://gcc.gnu.org/pipermail/fortran/2020-September/054978.html the reasoning behind the solution is explained here: https://gcc.gnu.org/pipermail/fortran/2020-September/054997.html In short, calls to class copy functions are made with wrong funct