* Possible bug in gimplify.c:mostly_copy_tree_r with SAVE_EXPR
@ 2004-09-24 0:12 Richard Kenner
0 siblings, 0 replies; only message in thread
From: Richard Kenner @ 2004-09-24 0:12 UTC (permalink / raw)
To: rth; +Cc: gcc
Although it's correct that a SAVE_EXPR can be shared, I don't believe its
contents can. If we have an expression both in the SAVE_EXPR and someplace
else, they must be unique copies. I'm running into a SIGSEGV on a small Ada
test case where a COND_EXPR is set to VOID_TYPE but then when it sees it
inside a non-VOID SAVE_EXPR, it gets confused.
So I think it shouldn't copy a SAVE_EXPR, but should not clear *walk_subtree.
Unfortunately, just doing that doesn't fix the problem, so I'm a little
confused. The test case is two tiny Ada files:
identifiers.ads is:
package Identifiers is
type ID_Type (<>) is private;
function Create (S : String) return ID_Type;
function Create (I : Integer) return ID_Type;
private
type Disc is ( Str, Int );
type ID_Type (D : Disc) is
record
case D is
when Str => S : String (1..80);
when Int => I : Integer;
end case;
end record;
end Identifiers;
and test_ids.adb is
with Identifiers; use Identifiers;
procedure Test_IDs is
X : ID_Type := Create ("Francisco");
Y : ID_Type := Create (12);
Z : ID_Type := X;
begin
null;
end Test_IDs;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-09-23 23:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-24 0:12 Possible bug in gimplify.c:mostly_copy_tree_r with SAVE_EXPR Richard Kenner
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).