Re: BUG #4190: sparc64 test suite fails

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4190: sparc64 test suite fails
Дата
Msg-id 19376.1211569774@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4190: sparc64 test suite fails  ("Dennis Gilmore" <dennis@ausil.us>)
Ответы Re: BUG #4190: sparc64 test suite fails  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-bugs
"Dennis Gilmore" <dennis@ausil.us> writes:
> errors test fails.  the following is the output.  which to me indicates it
> passed  but gave different output.

No, it failed.  The code in question looks like this:

    int64        arg1 = PG_GETARG_INT64(0);
    int32        arg2 = PG_GETARG_INT32(1);
    int64        result;

    if (arg2 == 0)
        ereport(ERROR,
                (errcode(ERRCODE_DIVISION_BY_ZERO),
                 errmsg("division by zero")));

    result = arg1 / arg2;

and the output you are showing indicates that the compiler thought it
could rearrange the code so that the division was executed *despite*
the protective test in front of it.

IMHO, what you have here is a compiler bug, or at least the gcc boys are
going to need to provide a damn good excuse why it's not.

BTW, kindly revert the patch you inserted in the Fedora repository.

            regards, tom lane

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

Предыдущее
От: "Martin Saschek"
Дата:
Сообщение: BUG #4191: Include hint for Windows-like locals in documentation
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: BUG #4190: sparc64 test suite fails