mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Try harder to detect unavailability of __builtin_mul_overflow(int64).
Commit c04d35f44
didn't quite do the job here, because it still allowed
the compiler to deduce that the function call could be optimized away.
Prevent that by putting the arguments and results in global variables.
Discussion: https://postgr.es/m/20171213213754.pydkyjs6bt2hvsdb@alap3.anarazel.de
This commit is contained in:
9
configure
vendored
9
configure
vendored
@ -14485,14 +14485,15 @@ else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
PG_INT64_TYPE a = 1;
|
||||
PG_INT64_TYPE b = 1;
|
||||
PG_INT64_TYPE result;
|
||||
__builtin_mul_overflow(*(volatile PG_INT64_TYPE *) a, *(volatile PG_INT64_TYPE *) b, &result);
|
||||
int oflo;
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
oflo = __builtin_mul_overflow(a, b, &result);
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user