aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Haley <aph@cygnus.com>1999-01-13 06:13:37 +0000
committerAndrew Haley <aph@gcc.gnu.org>1999-01-13 06:13:37 +0000
commit9684789222a5e8e34eac4565cd42f4e848a942fc (patch)
tree2c27d075b4014382a25b9f3db1ff1efc6de4ed40 /gcc
parentba179f9f6f3c593721837c6c24cc39296a6eb92d (diff)
downloadgcc-9684789222a5e8e34eac4565cd42f4e848a942fc.zip
gcc-9684789222a5e8e34eac4565cd42f4e848a942fc.tar.gz
gcc-9684789222a5e8e34eac4565cd42f4e848a942fc.tar.bz2
expr.c (generate_name): Name prefix changed to avoid clashes with assembler temp labels.
1999-01-13 Andrew Haley <aph@cygnus.com> * expr.c (generate_name): Name prefix changed to avoid clashes with assembler temp labels. * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on MODIFY_EXPR. Without this, code for the assignement may not be generated at all and the synchronized statement will read an uninitialized variable. From-SVN: r24649
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog10
-rw-r--r--gcc/java/expr.c2
-rw-r--r--gcc/java/parse.c14
-rw-r--r--gcc/java/parse.y8
4 files changed, 22 insertions, 12 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index a175442..d3062f8 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,13 @@
+1999-01-13 Andrew Haley <aph@cygnus.com>
+
+ * expr.c (generate_name): Name prefix changed to avoid clashes
+ with assembler temp labels.
+
+ * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
+ MODIFY_EXPR. Without this, code for the assignement may not be
+ generated at all and the synchronized statement will read an
+ uninitialized variable.
+
Wed Jan 13 01:24:54 1999 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (maybe_layout_super_class): Fixed returned value.
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 136415b..623eb90 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1186,7 +1186,7 @@ generate_name ()
{
static int l_number = 0;
char buff [20];
- sprintf (buff, "$L%d", l_number++);
+ sprintf (buff, "$LJv%d", l_number++);
return get_identifier (buff);
}
diff --git a/gcc/java/parse.c b/gcc/java/parse.c
index a357e8d..c34aa13 100644
--- a/gcc/java/parse.c
+++ b/gcc/java/parse.c
@@ -2250,7 +2250,7 @@ static const short yycheck[] = { 3,
#define YYPURE 1
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/cygnus/gnupro-98r1/share/bison.simple"
+#line 3 "/usr/local/share/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -2443,7 +2443,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
-#line 196 "/usr/cygnus/gnupro-98r1/share/bison.simple"
+#line 196 "/usr/local/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -4701,7 +4701,7 @@ case 492:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/cygnus/gnupro-98r1/share/bison.simple"
+#line 498 "/usr/local/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
@@ -13461,7 +13461,7 @@ patch_synchronized_statement (node, wfl_op1)
tree expr = java_complete_tree (TREE_OPERAND (node, 0));
tree block = TREE_OPERAND (node, 1);
- tree enter, exit, finally, expr_decl;
+ tree enter, exit, finally, expr_decl, assignment;
if (expr == error_mark_node)
{
@@ -13501,13 +13501,13 @@ patch_synchronized_statement (node, wfl_op1)
BUILD_MONITOR_EXIT (exit, expr_decl);
CAN_COMPLETE_NORMALLY (enter) = 1;
CAN_COMPLETE_NORMALLY (exit) = 1;
+ assignment = build (MODIFY_EXPR, NULL_TREE, expr_decl, expr);
+ TREE_SIDE_EFFECTS (assignment) = 1;
node = build1 (CLEANUP_POINT_EXPR, NULL_TREE,
build (COMPOUND_EXPR, NULL_TREE,
build (WITH_CLEANUP_EXPR, NULL_TREE,
build (COMPOUND_EXPR, NULL_TREE,
- build (MODIFY_EXPR, NULL_TREE,
- expr_decl, expr),
- enter),
+ assignment, enter),
NULL_TREE, exit),
block));
node = build_expr_block (node, expr_decl);
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 03d04ee..0384004 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -10823,7 +10823,7 @@ patch_synchronized_statement (node, wfl_op1)
tree expr = java_complete_tree (TREE_OPERAND (node, 0));
tree block = TREE_OPERAND (node, 1);
- tree enter, exit, finally, expr_decl;
+ tree enter, exit, finally, expr_decl, assignment;
if (expr == error_mark_node)
{
@@ -10863,13 +10863,13 @@ patch_synchronized_statement (node, wfl_op1)
BUILD_MONITOR_EXIT (exit, expr_decl);
CAN_COMPLETE_NORMALLY (enter) = 1;
CAN_COMPLETE_NORMALLY (exit) = 1;
+ assignment = build (MODIFY_EXPR, NULL_TREE, expr_decl, expr);
+ TREE_SIDE_EFFECTS (assignment) = 1;
node = build1 (CLEANUP_POINT_EXPR, NULL_TREE,
build (COMPOUND_EXPR, NULL_TREE,
build (WITH_CLEANUP_EXPR, NULL_TREE,
build (COMPOUND_EXPR, NULL_TREE,
- build (MODIFY_EXPR, NULL_TREE,
- expr_decl, expr),
- enter),
+ assignment, enter),
NULL_TREE, exit),
block));
node = build_expr_block (node, expr_decl);