https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
Thomas Koenig changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #26 from Thomas Koenig ---
There is a bit more that can be done when the exponent is
known at compile time.
For example,
unsigned(kind=4) :: x
y = x**13u
could be translated as
if (x & 7 == 0) /* Check for divisibili
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #25 from Thomas Koenig ---
Created attachment 60283
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60283&action=edit
Preliminary patch
Here's a mostly-complete patch. It lacks test cases and and
ChangeLog entries, but should w
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #24 from Thomas Koenig ---
Considering that ctz is rather expensive, comparable to an
integer multiplication, I think I will do away with this
optimization altogether - we are spending log2(n) imuls anyway.
I think the library versi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #23 from Mikael Morin ---
(In reply to Thomas Koenig from comment #20)
> Right now, I am doing unsigned**unsigned. This is already a
> bit larger than I originally thought. After this is committed,
> we can still discuss how to ext
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #22 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #21)
> When doing x ** n in unsigned binary arithmetic, and x is an unsigned with k
> bits, and we do arithmetic modulo 2^k, then
>
> x ** n = x ** min (n, k)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #21 from anlauf at gcc dot gnu.org ---
When doing x ** n in unsigned binary arithmetic, and x is an unsigned with k
bits, and we do arithmetic modulo 2^k, then
x ** n = x ** min (n, k) (mod 2^k)
so we can immediately saturate the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #20 from Thomas Koenig ---
Right now, I am doing unsigned**unsigned. This is already a
bit larger than I originally thought. After this is committed,
we can still discuss how to extend it, I think.
There is actually an interesting
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
Mikael Morin changed:
What|Removed |Added
CC||mikael at gcc dot gnu.org
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #18 from kargls at comcast dot net ---
On 1/17/25 10:17, anlauf at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
>
> --- Comment #17 from anlauf at gcc dot gnu.org ---
>
> As it is not clear what is th
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #17 from anlauf at gcc dot gnu.org ---
A type promotion or conversion for binary operations is a real issue.
While it is feasible, we should step back and draw a line what is more or
less consistent with the spirit of the UNSIGNED pro
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #16 from kargls at comcast dot net ---
On 1/17/25 03:47, tkoenig at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
>
> --- Comment #15 from Thomas Koenig ---
> (In reply to kargls from comment #14)
>> (
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #15 from Thomas Koenig ---
(In reply to kargls from comment #14)
> (In reply to anlauf from comment #13)
> > (In reply to kargls from comment #12)
> > > (In reply to Thomas Koenig from comment #9)
> > > > Question is, what should we
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #14 from kargls at comcast dot net ---
(In reply to anlauf from comment #13)
> (In reply to kargls from comment #12)
> > (In reply to Thomas Koenig from comment #9)
> > > Question is, what should we permit...
> > >
> > > For 'normal'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #13 from anlauf at gcc dot gnu.org ---
(In reply to kargls from comment #12)
> (In reply to Thomas Koenig from comment #9)
> > Question is, what should we permit...
> >
> > For 'normal' operations, only unsigned op unsigned is permit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #12 from kargls at comcast dot net ---
(In reply to Thomas Koenig from comment #9)
> Question is, what should we permit...
>
> For 'normal' operations, only unsigned op unsigned is permitted,
> so unsigned**unsigned is obviously ok.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #11 from anlauf at gcc dot gnu.org ---
(In reply to Jerry DeLisle from comment #10)
> (In reply to Thomas Koenig from comment #9)
> > Question is, what should we permit...
> >
> > For 'normal' operations, only unsigned op unsigned is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #10 from Jerry DeLisle ---
(In reply to Thomas Koenig from comment #9)
> Question is, what should we permit...
>
> For 'normal' operations, only unsigned op unsigned is permitted,
> so unsigned**unsigned is obviously ok.
>
> What a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #9 from Thomas Koenig ---
Question is, what should we permit...
For 'normal' operations, only unsigned op unsigned is permitted,
so unsigned**unsigned is obviously ok.
What about (integer|real|complex)**unsigned?
What about unsign
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
Thomas Koenig changed:
What|Removed |Added
Ever confirmed|0 |1
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
Jerry DeLisle changed:
What|Removed |Added
CC||jvdelisle at gcc dot gnu.org
--- Commen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #6 from kargls at comcast dot net ---
(In reply to kargls from comment #5)
> (In reply to Thomas Koenig from comment #3)
> Yes, please lift the restriction. I ran into this issue while
> writing a testcase as well. As J3 is not con
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #5 from kargls at comcast dot net ---
(In reply to Thomas Koenig from comment #3)
> (In reply to kargls from comment #2)
> > Not Thomas, but ...
> >
> > https://j3-fortran.org/doc/year/24/24-116.txt
> >
> > The exponentiation operat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #4 from anlauf at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #3)
> (In reply to kargls from comment #2)
> > Not Thomas, but ...
> >
> > https://j3-fortran.org/doc/year/24/24-116.txt
> >
> > The exponentiation operat
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
--- Comment #3 from Thomas Koenig ---
(In reply to kargls from comment #2)
> Not Thomas, but ...
>
> https://j3-fortran.org/doc/year/24/24-116.txt
>
> The exponentiation operator ** shall not be applied to UNSIGNED values.
That was something
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
kargls at comcast dot net changed:
What|Removed |Added
CC||kargls at comcast dot net
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118499
anlauf at gcc dot gnu.org changed:
What|Removed |Added
CC||tkoenig at gcc dot gnu.org
-
27 matches
Mail list logo