[Bug preprocessor/78581] New: Out of memory when preprocessing #include with -traditional
rf at rufflewind dot com
gcc-bugzilla@gcc.gnu.org
Tue Nov 29 09:08:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78581
Bug ID: 78581
Summary: Out of memory when preprocessing #include with
-traditional
Product: gcc
Version: 6.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: rf at rufflewind dot com
Target Milestone: ---
Suppose there are two files within the same directory:
File "a":
#define g 0
#include "b"
#if g
#endif
File "b":
#define f(x)
f
Preprocessing this in -traditional mode leads to a strange error:
$ gcc -E -traditional -x assembler-with-cpp a >/dev/null
cc1: out of memory allocating 9223372036854571464 bytes after a total of
434176 bytes
Perhaps the fact that file "b" ends with "f" might be related?
(Note: I ran into this error while compiling Haskell code containing CPP
constructs.)
GCC version: 6.2.1 20160830 (using the prebuilt package from
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/gcc
)
System: Linux 4.8.10-1-ARCH x86_64 GNU/Linux
More information about the Gcc-bugs
mailing list