public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19634] New: Infinite memory usage on Alpha
@ 2005-01-26 1:42 falk at debian dot org
2005-01-26 1:43 ` [Bug c++/19634] " falk at debian dot org
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: falk at debian dot org @ 2005-01-26 1:42 UTC (permalink / raw)
To: gcc-bugs
This makes 27_io/basic_istream/extractors_character/char/9826.cc fail
(see e.g. http://gcc.gnu.org/ml/gcc-testresults/2005-01/msg01098.html). I'll
attach a semi-reduced test case. Doesn't seem to happen on other platforms.
Profiling shows prominently "alpha_sa_mask" and "reload". Adding -da makes the
problem go away...
--
Summary: Infinite memory usage on Alpha
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: memory-hog
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: falk at debian dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: alphaev68-unknown-linux-gnu
GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
@ 2005-01-26 1:43 ` falk at debian dot org
2005-01-26 1:45 ` [Bug middle-end/19634] " pinskia at gcc dot gnu dot org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: falk at debian dot org @ 2005-01-26 1:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2005-01-26 01:43 -------
Created an attachment (id=8072)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8072&action=view)
Test case. Compile with no options
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/19634] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
2005-01-26 1:43 ` [Bug c++/19634] " falk at debian dot org
@ 2005-01-26 1:45 ` pinskia at gcc dot gnu dot org
2005-01-26 10:31 ` [Bug target/19634] " giovannibajo at libero dot it
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-26 1:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |middle-end
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/19634] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
2005-01-26 1:43 ` [Bug c++/19634] " falk at debian dot org
2005-01-26 1:45 ` [Bug middle-end/19634] " pinskia at gcc dot gnu dot org
@ 2005-01-26 10:31 ` giovannibajo at libero dot it
2005-01-26 11:03 ` [Bug target/19634] [4.0 regression] " falk at debian dot org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: giovannibajo at libero dot it @ 2005-01-26 10:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2005-01-26 10:30 -------
Is this a regression?
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (2 preceding siblings ...)
2005-01-26 10:31 ` [Bug target/19634] " giovannibajo at libero dot it
@ 2005-01-26 11:03 ` falk at debian dot org
2005-01-26 11:17 ` falk at debian dot org
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: falk at debian dot org @ 2005-01-26 11:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2005-01-26 11:03 -------
(In reply to comment #2)
> Is this a regression?
Yes, g++ 3.4 compiles this fine , and 3.3 too if I s/class/struct/.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.0.0
Known to work| |3.3.3 3.4.3
Summary|Infinite memory usage on |[4.0 regression] Infinite
|Alpha |memory usage on Alpha
Version|4.0.0 |3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (3 preceding siblings ...)
2005-01-26 11:03 ` [Bug target/19634] [4.0 regression] " falk at debian dot org
@ 2005-01-26 11:17 ` falk at debian dot org
2005-01-26 11:17 ` steven at gcc dot gnu dot org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: falk at debian dot org @ 2005-01-26 11:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2005-01-26 11:17 -------
Whoops.
--
What |Removed |Added
----------------------------------------------------------------------------
Version|3.0 |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (4 preceding siblings ...)
2005-01-26 11:17 ` falk at debian dot org
@ 2005-01-26 11:17 ` steven at gcc dot gnu dot org
2005-01-26 11:23 ` falk at debian dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-26 11:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-01-26 11:16 -------
Is this a recent problem, ie. any idea when this started to FAIL?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (5 preceding siblings ...)
2005-01-26 11:17 ` steven at gcc dot gnu dot org
@ 2005-01-26 11:23 ` falk at debian dot org
2005-02-10 3:45 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: falk at debian dot org @ 2005-01-26 11:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2005-01-26 11:23 -------
(In reply to comment #4)
> Is this a recent problem, ie. any idea when this started to FAIL?
With 20041209, I get a segfault. With 20050116 or 20050120, I get the infinite
loop. I don't have any other old versions around. Seems to indicate memory
corruption...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (6 preceding siblings ...)
2005-01-26 11:23 ` falk at debian dot org
@ 2005-02-10 3:45 ` pinskia at gcc dot gnu dot org
2005-02-10 10:13 ` rth at gcc dot gnu dot org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-10 3:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug target/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (7 preceding siblings ...)
2005-02-10 3:45 ` pinskia at gcc dot gnu dot org
@ 2005-02-10 10:13 ` rth at gcc dot gnu dot org
2005-02-10 10:59 ` [Bug c++/19634] " rth at gcc dot gnu dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-02-10 10:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2005-02-10 01:07 -------
Some sort of reload bug. We keep allocating new spill slots.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rth at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-02-10 01:07:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (8 preceding siblings ...)
2005-02-10 10:13 ` rth at gcc dot gnu dot org
@ 2005-02-10 10:59 ` rth at gcc dot gnu dot org
2005-02-10 11:02 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-02-10 10:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2005-02-10 01:59 -------
Not a reload bug. RTL state gets mangled by pop_function_context_from
called underneath mangle_decl_string. We may be able to work around this
problem like so, but I'm still not certain that we're not borking something.
This can only be truely fixed by not doing such gross push/pop state
changes within the c++ front end.
Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.65
diff -u -p -d -r2.65 passes.c
--- passes.c 1 Feb 2005 10:03:09 -0000 2.65
+++ passes.c 10 Feb 2005 01:57:18 -0000
@@ -1530,6 +1530,12 @@ rest_of_compilation (void)
if (rtl_dump_and_exit || flag_syntax_only || errorcount || sorrycount)
goto exit_rest_of_compilation;
+ /* Make sure rtl for the current function is set at this point. This
+ may recurse in "interesting" ways for c++, which can hork passes.
+ It is 100% certain that we'll need this rtl, so this does not cause
+ extra work. */
+ (void) DECL_RTL (current_function_decl);
+
rest_of_handle_jump ();
rest_of_handle_eh ();
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at gcc dot gnu dot org
AssignedTo|rth at gcc dot gnu dot org |unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
Component|target |c++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (9 preceding siblings ...)
2005-02-10 10:59 ` [Bug c++/19634] " rth at gcc dot gnu dot org
@ 2005-02-10 11:02 ` pinskia at gcc dot gnu dot org
2005-02-10 11:06 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-10 11:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-10 02:05 -------
This is related PR 18683 which is a related problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (10 preceding siblings ...)
2005-02-10 11:02 ` pinskia at gcc dot gnu dot org
@ 2005-02-10 11:06 ` pinskia at gcc dot gnu dot org
2005-02-10 11:12 ` rth at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-10 11:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-10 02:15 -------
RTH, you added the wrong mark before.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (11 preceding siblings ...)
2005-02-10 11:06 ` pinskia at gcc dot gnu dot org
@ 2005-02-10 11:12 ` rth at gcc dot gnu dot org
2005-02-10 12:50 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-02-10 11:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2005-02-10 02:20 -------
True enough, and one could indeed "fix" this problem on Alpha by adding a
similar check to samegp_function_operand. However, I don't think this is
the right approach to this problem. How many other places in other targets
need to be changed? I'd very much prefer a solution that fixes all such
potential problems all at once.
It *is* 100% certain that once we've started generating rtl for a function,
that we'll need the DECL_ASSEMBLER_NAME in order to emit it. We might as
well do this in one place, rather than having to recurse in some random place
later during code generation.
And for the record, the problem here has to do with reseting
virtuals_instantiated instead of reg_renumber.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (12 preceding siblings ...)
2005-02-10 11:12 ` rth at gcc dot gnu dot org
@ 2005-02-10 12:50 ` mmitchel at gcc dot gnu dot org
2005-02-11 13:40 ` rth at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-10 12:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-02-10 04:35 -------
I agree that the C++ recursion is very ugly. The last time I looked at this, I
concluded it would be hard to fix, but now I'm not entirely certain that's true.
The problem comes from the call to push_access_scope in
get_mostly_instantiated_function_type. There's certainly no need to do access
control in this context; we could just save and restore flag_access_control.
The comment says "make sure that we can see identifiers" -- but I don't think
that makes any sense.
If that doesn't work, I think that rth's proposed fix is a reasonable
work-around. I'd be worried, though, that in the process of compiling the
function, after this point, we might need to mangle some other function (say,
one called from this one), and run into the same problem because of that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (13 preceding siblings ...)
2005-02-10 12:50 ` mmitchel at gcc dot gnu dot org
@ 2005-02-11 13:40 ` rth at gcc dot gnu dot org
2005-02-12 3:34 ` rth at gcc dot gnu dot org
2005-04-20 2:14 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-02-11 13:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2005-02-11 04:29 -------
patch: http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00490.html
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rth at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Keywords| |patch
Last reconfirmed|2005-02-10 01:07:14 |2005-02-11 04:29:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (14 preceding siblings ...)
2005-02-11 13:40 ` rth at gcc dot gnu dot org
@ 2005-02-12 3:34 ` rth at gcc dot gnu dot org
2005-04-20 2:14 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-02-12 3:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2005-02-11 21:10 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/19634] [4.0 regression] Infinite memory usage on Alpha
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
` (15 preceding siblings ...)
2005-02-12 3:34 ` rth at gcc dot gnu dot org
@ 2005-04-20 2:14 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-20 2:14 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19634
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2005-04-20 2:14 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-26 1:42 [Bug c++/19634] New: Infinite memory usage on Alpha falk at debian dot org
2005-01-26 1:43 ` [Bug c++/19634] " falk at debian dot org
2005-01-26 1:45 ` [Bug middle-end/19634] " pinskia at gcc dot gnu dot org
2005-01-26 10:31 ` [Bug target/19634] " giovannibajo at libero dot it
2005-01-26 11:03 ` [Bug target/19634] [4.0 regression] " falk at debian dot org
2005-01-26 11:17 ` falk at debian dot org
2005-01-26 11:17 ` steven at gcc dot gnu dot org
2005-01-26 11:23 ` falk at debian dot org
2005-02-10 3:45 ` pinskia at gcc dot gnu dot org
2005-02-10 10:13 ` rth at gcc dot gnu dot org
2005-02-10 10:59 ` [Bug c++/19634] " rth at gcc dot gnu dot org
2005-02-10 11:02 ` pinskia at gcc dot gnu dot org
2005-02-10 11:06 ` pinskia at gcc dot gnu dot org
2005-02-10 11:12 ` rth at gcc dot gnu dot org
2005-02-10 12:50 ` mmitchel at gcc dot gnu dot org
2005-02-11 13:40 ` rth at gcc dot gnu dot org
2005-02-12 3:34 ` rth at gcc dot gnu dot org
2005-04-20 2:14 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).