This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

g++ alloca() problem on Tru64 UNIX





Hello,

g++ alloca() function does not seem to respect #pragma intrinsic(alloca) on Tru64 UNIX.
It eats up all the available memory... here is the reproducer..

$ sizer -v
Compaq Tru64 UNIX V5.1A (Rev. 1885); Thu Aug 21 17:07:50 CEST 2003
$ cat alloca.c
#include <alloca.h>

void f (void) {
        char *data=(char*)alloca(8192);
}

int main (int ac, char **av)
{
        while (1) {
                f();
        }
}
$ g++ --version
g++ (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ g++ -o alloca alloca.c
$ ./alloca
[ eats all the available memory... ]

thank you!

//Shiva


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]