diff options
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/ada/utils.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gnat.dg/discr5.adb | 17 | ||||
-rw-r--r-- | gcc/tree.c | 5 |
6 files changed, 35 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1700242..572b6ed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2008-01-17 Eric Botcazou <ebotcazou@adacore.com> + + * tree.c (substitute_in_expr): Add missing 'break'. + 2008-01-17 Richard Guenther <rguenther@suse.de> PR tree-optimization/34825 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1dd2fc5..33293cf 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2008-01-17 Eric Botcazou <ebotcazou@adacore.com> + + * utils.c (build_function_stub): Properly build the call expression. + 2008-01-14 Eric Botcazou <ebotcazou@adacore.com> * decl.c (gnat_to_gnu_entity) <object>: Process renamings diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index 1c97541..32cbbff 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -3022,9 +3022,9 @@ build_function_stub (tree gnu_subprog, Entity_Id gnat_subprog) /* Invoke the internal subprogram. */ gnu_subprog_addr = build1 (ADDR_EXPR, build_pointer_type (gnu_subprog_type), gnu_subprog); - gnu_subprog_call = build3 (CALL_EXPR, TREE_TYPE (gnu_subprog_type), - gnu_subprog_addr, nreverse (gnu_param_list), - NULL_TREE); + gnu_subprog_call = build_call_list (TREE_TYPE (gnu_subprog_type), + gnu_subprog_addr, + nreverse (gnu_param_list)); /* Propagate the return value, if any. */ if (VOID_TYPE_P (TREE_TYPE (gnu_subprog_type))) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 329c57a..b5a4162 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2008-01-17 Eric Botcazou <ebotcazou@adacore.com> + * gnat.dg/discr5.adb: New test. + +2008-01-17 Eric Botcazou <ebotcazou@adacore.com> + * gcc.c-torture/compile/20080114-1.c: Use empty asm statements. 2008-01-17 Richard Guenther <rguenther@suse.de> diff --git a/gcc/testsuite/gnat.dg/discr5.adb b/gcc/testsuite/gnat.dg/discr5.adb new file mode 100644 index 0000000..631db55 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr5.adb @@ -0,0 +1,17 @@ +-- { dg-do compile } + +procedure Discr5 is + + type Enum is (Ten, Twenty); + for Enum use (10, 20); + type Arr is array (Enum range <>) of Integer; + type Rec (Discr: Enum := Ten) is record + case Discr is + when others => + A: Arr (Ten .. Discr); + end case; + end record; + +begin + null; +end; @@ -2530,8 +2530,8 @@ substitute_in_expr (tree exp, tree f, tree r) { tree copy = NULL_TREE; int i; - int n = TREE_OPERAND_LENGTH (exp); - for (i = 1; i < n; i++) + + for (i = 1; i < TREE_OPERAND_LENGTH (exp); i++) { tree op = TREE_OPERAND (exp, i); tree newop = SUBSTITUTE_IN_EXPR (op, f, r); @@ -2546,6 +2546,7 @@ substitute_in_expr (tree exp, tree f, tree r) else return exp; } + break; default: gcc_unreachable (); |