gnu.de
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

None

John Ollason

12 Jan 2001 12 Jan '01
8:01 p.m.

Greetings, I think I might have discovered a bug in gpc. A test program follows. John Ollason ------------------- { The following program illustrates a bug discovered in gpc. The program functions correctly with the set 0..31, but with the set 0..32 or greater the second call to card returns zero, and the contents of the set disappear after the first call. The following is the output from gpc --verbose Using builtin specs. gpc version 19990118, based on gcc-2.8.1 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/crtbegin.o -L/usr/lib/gcc-lib/i386-redhat-linux/2.8.1 -L/usr/i386-redhat-linux/lib -lgpc -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/crtend.o /usr/lib/crtn.o /usr/lib/crt1.o(.text+0x18): undefined reference to `main' } program settest(input,output); var i:integer; a: array[1..1] of record stuff:set of 0..32; end; begin with a[1] do begin stuff:=[]; stuff:=stuff+[2]; stuff:=stuff+[3]; writeln(card(stuff)); for i in stuff do writeln(i); writeln(card(stuff)); for i in stuff do writeln(i); end end.

0 0
Reply
Sign in to reply online Use email software

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.12.