This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/55219] [4.7 regression] attempting to compile a pre-processed unit eats up memory until OOM kills the cc1 process
- From: "markus at trippelsdorf dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Nov 2012 15:31:43 +0000
- Subject: [Bug middle-end/55219] [4.7 regression] attempting to compile a pre-processed unit eats up memory until OOM kills the cc1 process
- Auto-submitted: auto-generated
- References: <bug-55219-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55219
Markus Trippelsdorf <markus at trippelsdorf dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markus at trippelsdorf dot
| |de
--- Comment #2 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-11-06 15:31:43 UTC ---
Here is a reduced testcase that still uses over 2GB of RAM in all
supported gcc versions:
markus@x4 tmp % cat test.i
typedef enum
{ b }
zn_type;
int x, a1_1_2, a1_1_8, a1_1_4, a1_1_3, a1_0, a1_0_0, a1_1_5;
double a2_0_1;
const int a2_1_4;
const zn_type a2_0;
void
fn1 ()
{
a1_0_0 =
(a1_0 ? a1_1_2 : a1_0 ? a1_1_3 : a1_0 ? a1_1_4 : a1_0 ? a1_1_5 :
a1_0 ? a1_1_3 : a1_0 ? a1_1_4 : a1_0 ? a1_1_8 : x) +
(a2_0 ? : a2_0 ? : a2_0 ? : a2_0 ? : a2_0 ? : a2_0 ? : a2_0 ? : a2_0 ?
:
a2_0 ? : a2_0 ? : a2_0 ? a2_0_1 : a2_0 ? : 0 ? : a2_0 ? : a2_0 ? :
a2_0 ? : a2_0 ? : a2_0 ? : a2_0 ? a2_1_4 : a2_0 ? : x);
}
markus@x4 tmp % ulimit -v 2000000
markus@x4 tmp % gcc -c test.i
virtual memory exhausted: Cannot allocate memory