[PATCH 4/4] fortran: Use pointer arithmetic to index arrays [PR102043]

2022-04-16 Thread Mikael Morin via Gcc-patches
The code generated for array references used to be ARRAY_REF trees as could be expected. However, the middle-end may conclude from those trees that the indexes used are non-negative (more precisely not below the lower bound), which is a wrong assumption in the case of "reversed- order" arrays. Th

[PATCH 3/4] fortran: Generate an array temporary reference [PR102043]

2022-04-16 Thread Mikael Morin via Gcc-patches
This avoids regressing on char_cast_1.f90 and char_cast_2.f90 later in the patch series when the code generation for array references is changed to use pointer arithmetic. The regressing testcases match part of an array reference in the generated tree dump and it’s not clear how the pattern should

[PATCH 2/4] fortran: Update index extraction code. [PR102043]

2022-04-16 Thread Mikael Morin via Gcc-patches
This avoids a regression on hollerith4.f90 and hollerith6.f90 later in the patch series when code generation for array references is changed to use pointer arithmetic. The problem comes from the extraction of the array index from an ARRAY_REF tree, which doesn’t work if the tree is not an ARRAY_RE

[PATCH 1/4] fortran: Pre-evaluate string pointers. [PR102043]

2022-04-16 Thread Mikael Morin via Gcc-patches
This avoids a regression on deferred_character_23.f90 later in the patch series when array references are rewritten to use pointer arithmetic. The problem is a SAVE_EXPR tree as TYPE_SIZE_UNIT of one array element type, which is used by the pointer arithmetic expressions. As these expressions app

[PATCH 0/4] Use pointer arithmetic for array references [PR102043]

2022-04-16 Thread Mikael Morin via Gcc-patches
Hello, this is a fix for PR102043, which is a wrong code bug caused by the middle-end concluding from array indexing that the array index is non-negative. This is a wrong assumption for "reversed arrays", that is arrays whose descriptor makes accesses to the array from last element to first eleme

[PATCH] get rid of POPCOUNTCST* macros in libgcc2.c

2022-04-16 Thread Stefan Kanthak via Gcc-patches
Hi @ll, the "magic" constants 0x55...55, 0x33...33, 0x0f...0f and 0x01...01 used in the popcountsi2() and popcountdi2() functions defined in libgcc2.c are currently generated iterative via the 4 macros POPCOUNTCST, POPCOUNTCST8, POPCOUNTCST4 and POPCOUNTCST2 from 2 nibbles over 4 and 8 nibbles to

[committed] doc: Adjust mingw-w64 download link

2022-04-16 Thread Gerald Pfeifer
Pushed. Gerald gcc: * doc/install.texi (Specific): Adjust mingw-w64 download link. --- gcc/doc/install.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index ab67a639836..642aae07a58 100644 --- a/gcc/doc/install.texi ++

[committed] wwwdocs: frontends: Move www.gnu-pascal.de to https

2022-04-16 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/frontends.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/frontends.html b/htdocs/frontends.html index 748ca182..3aa06bbb 100644 --- a/htdocs/frontends.html +++ b/htdocs/frontends.html @@ -29,7 +29,7 @@ are very mature. -http://www.g

Re: [wwwdocs] Add Ada's changelog entry

2022-04-16 Thread Gerald Pfeifer
On Fri, 15 Apr 2022, Fernando Oleo Blanco wrote: > thank you for your comments. As you have picked up, HTML is not my > strongest language. > > I did not know that "<" and ">" had to scaped in HTML, I will try to > remember that. No worries, Fernando. "<" and ">" require special handling in HTML

Re: [wwwdocs] Add Ada's changelog entry

2022-04-16 Thread Gerald Pfeifer
On Wed, 13 Apr 2022, Gerald Pfeifer wrote: > I am not familiar with that Emacs mode, but < and > are special characters > in HTML and have to be written as < (less than) and > (greater than) > respectively. Here is a second batch which I had missed originally. Also pushed... Gerald commit a