Re: GIN FailedAssertions on Itanium2 with Intel compiler

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: GIN FailedAssertions on Itanium2 with Intel compiler
Дата
Msg-id 44F6DA1F.4090002@sigaev.ru
обсуждение исходный текст
Ответ на Re: GIN FailedAssertions on Itanium2 with Intel compiler  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: GIN FailedAssertions on Itanium2 with Intel compiler
Список pgsql-hackers
Simple illustration:

#include <stdio.h>
#include <stdlib.h>

static char SI = 0;

static int
cmp(const void *a, const void *b) {    puts("CALL cmp");    if ( *(int*)a == *(int*)b ) {        puts("SET SI = 1");
   SI = 1;        return 0;    }    return ( *(int*)a > *(int*)b ) ? 1 : -1;
 
}

int
main(int argn, char *argv[]) {    int         a[]={43,43};
    SI = 0;    qsort(a, sizeof(a)/sizeof(int),  sizeof(int), cmp);
    if ( SI )        puts("OK");    else        puts("BUG: SI==0");
    return 0;
}


% icc -O2 -o 1 1.c && ./1
CALL cmp
SET SI = 1
BUG: SI==0
% icc -O1 -o 1 1.c && ./1
CALL cmp
SET SI = 1
OK


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Prepared statements considered harmful
Следующее
От: Csaba Nagy
Дата:
Сообщение: Re: Prepared statements considered harmful