From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57614 invoked by alias); 7 Apr 2015 21:30:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 57546 invoked by uid 48); 7 Apr 2015 21:30:09 -0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/63191] [4.8/4.9/5 Regression] 32-bit gcc uses excessive memory during dead store elimination with -fPIC Date: Tue, 07 Apr 2015 21:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 4.9.1 X-Bugzilla-Keywords: memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: steven at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-04/txt/msg00472.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63191 --- Comment #6 from Steven Bosscher --- (In reply to woodfin from comment #5) > You could try adding a non-static function that returns an address inside Zs. > > const Z* getzs() { > return &Zs[0]; > } Yes, that does the trick: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 25244 stevenb 20 0 5964m 5.8g 30m R 100 9.3 25:03.60 cc1plus (and counting) Now let's see if I can come up with a more reasonable test case...