Re: GIN FailedAssertions on Itanium2 with Intel compiler

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Cc: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>
Subject: Re: GIN FailedAssertions on Itanium2 with Intel compiler
Date: 2006-08-31 12:46:23
Message-ID: 44F6DA1F.4090002@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Csaba Nagy 2006-08-31 12:52:05 Re: Prepared statements considered harmful
Previous Message Peter Eisentraut 2006-08-31 12:32:47 Re: Prepared statements considered harmful