Failures with gcd functions with GCC snapshots GCC and -O3 (?)

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Failures with gcd functions with GCC snapshots GCC and -O3 (?)
Дата
Msg-id YLiEOVpTg/7gxEVM@paquier.xyz
обсуждение исходный текст
Ответы Re: Failures with gcd functions with GCC snapshots GCC and -O3 (?)  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Re: Failures with gcd functions with GCC snapshots GCC and -O3 (?)  (Sergei Kornilov <sk@zsrv.org>)
Re: Failures with gcd functions with GCC snapshots GCC and -O3 (?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Failures with gcd functions with GCC snapshots GCC and -O3 (?)  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
Hi all,

serinus has been complaining about the new gcd functions in 13~:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=serinus&dt=2021-06-03%2003%3A44%3A14

The overflow detection is going wrong the way up and down, like here:
 SELECT gcd((-9223372036854775808)::int8, (-9223372036854775808)::int8); -- overflow
-ERROR:  bigint out of range
+         gcd
+----------------------
+ -9223372036854775808
+(1 row)

That seems like a compiler bug to me as this host uses recent GCC
snapshots, and I cannot see a problem in GCC 10.2 on my own dev box.
But perhaps I am missing something?

Thanks,
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Alias collision in `refresh materialized view concurrently`
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: Failures with gcd functions with GCC snapshots GCC and -O3 (?)