Re: [PATCH 4/5] value-range: Add as_string diagnostics helper

2022-11-12 Thread Andrew Pinski via Fortran
On Sat, Nov 12, 2022 at 3:47 PM Bernhard Reutner-Fischer via Gcc-patches wrote: > > gcc/ChangeLog: > > * value-range.cc (get_bound_with_infinite_markers): New static helper. > (irange::as_string): New definition. > * value-range.h: New declaration. > > --- > Provide means t

[PATCH 4/5] value-range: Add as_string diagnostics helper

2022-11-12 Thread Bernhard Reutner-Fischer via Fortran
gcc/ChangeLog: * value-range.cc (get_bound_with_infinite_markers): New static helper. (irange::as_string): New definition. * value-range.h: New declaration. --- Provide means to print a value range to a newly allocated buffer. The caller is responsible to free() the alloca

[PATCH 3/5] Fortran: Narrow return types [PR78798]

2022-11-12 Thread Bernhard Reutner-Fischer via Fortran
gcc/fortran/ChangeLog: * arith.cc (compare_complex): Use narrower return type. (gfc_compare_string): Likewise. * arith.h (gfc_compare_string): Same. (gfc_compare_with_Cstring): Ditto. * array.cc (compare_bounds): Ditto. (gfc_compare_array_spec): Like

[PATCH 5/5] gimple: Add pass to note possible type demotions; IPA pro/demotion; DO NOT MERGE

2022-11-12 Thread Bernhard Reutner-Fischer via Fortran
gcc/ChangeLog: * Makefile.in (OBJS): Add gimple-warn-types.o. * passes.def: Add pass_warn_type_demotion. * tree-pass.h (make_pass_warn_type_demotion): New declaration. * gimple-warn-types.cc: New file. gcc/c-family/ChangeLog: * c.opt (Wtype-demotion): New.

[PATCH 0/5] function result decl location; type demotion

2022-11-12 Thread Bernhard Reutner-Fischer via Fortran
Hi! The location of function result declarations was not set. The first two patches set the location of normal functions in C and C++. Jason, Nathan, I failed to support C++ template functions, see below. TL;DR. Why all this? PR78798 noted that we should use narrower function return types if fea

[PATCH 1/5] c: Set the locus of the function result decl

2022-11-12 Thread Bernhard Reutner-Fischer via Fortran
Bootstrapped and regtested on x86_86-unknown-linux with no regressions. Ok for trunk? Cc: Joseph Myers --- gcc/c/ChangeLog: * c-decl.cc (start_function): Set the result decl source location to the location of the typespec. --- gcc/c/c-decl.cc | 6 +- 1 file changed, 5 insert

[PATCH 2/5] c++: Set the locus of the function result decl

2022-11-12 Thread Bernhard Reutner-Fischer via Fortran
gcc/cp/ChangeLog: * decl.cc (start_function): Set the result decl source location to the location of the typespec. --- Bootstrapped and regtested on x86_86-unknown-linux with no regressions. Ok for trunk? Cc: Nathan Sidwell Cc: Jason Merrill --- gcc/cp/decl.cc | 15 +++

Re: [PATCH] Fortran: Remove unused declaration

2022-11-12 Thread Harald Anlauf via Fortran
Am 12.11.22 um 22:05 schrieb Bernhard Reutner-Fischer via Gcc-patches: This function definition was removed years ago, remove it's prototype. gcc/fortran/ChangeLog: * gfortran.h (gfc_check_include): Remove declaration. --- gcc/fortran/gfortran.h | 1 - 1 file changed, 1 deletion(-) -

[PATCH] Fortran: Remove unused declaration

2022-11-12 Thread Bernhard Reutner-Fischer via Fortran
This function definition was removed years ago, remove it's prototype. gcc/fortran/ChangeLog: * gfortran.h (gfc_check_include): Remove declaration. --- gcc/fortran/gfortran.h | 1 - 1 file changed, 1 deletion(-) --- Regtests cleanly, ok for trunk? diff --git a/gcc/fortran/gfortran.h b/g

Re: [PATCH] Fortran: fix treatment of character, value, optional dummy arguments [PR107444]

2022-11-12 Thread Mikael Morin
Hello, Le 10/11/2022 à 22:56, Harald Anlauf via Fortran a écrit : Dear Fortranners, the attached patch is a follow-up to the fix for PR107441, as it finally fixes the treatment of character dummy arguments that have the value,optional attribute, and allows for checking of the presence of such a

Re: [Patch] OpenMP/Fortran: Use firstprivat not alloc for ptr attach for arrays

2022-11-12 Thread Thomas Schwinge
Hi Tobias! On 2022-05-13T19:44:51+0200, Jakub Jelinek via Fortran wrote: > On Fri, May 13, 2022 at 07:21:02PM +0200, Tobias Burnus wrote: >> gcc/fortran/ChangeLog: >> >> * trans-openmp.cc (gfc_trans_omp_clauses): When mapping nondescriptor >> array sections, use GOMP_MAP_FIRSTPRIVATE_P