utils.c (max_size): Flip the second argument when recursing on TRUTH_NOT_EXPR.
* gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second argument when recursing on TRUTH_NOT_EXPR. From-SVN: r245697
This commit is contained in:
parent
7699e88f68
commit
4af362a957
|
@ -1,3 +1,8 @@
|
|||
2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gcc-interface/utils.c (max_size) <tcc_expression>: Flip the second
|
||||
argument when recursing on TRUTH_NOT_EXPR.
|
||||
|
||||
2017-02-12 John Marino <gnugcc@marino.st>
|
||||
|
||||
* system-freebsd-x86.ads: Rename into...
|
||||
|
|
|
@ -3635,7 +3635,8 @@ max_size (tree exp, bool max_p)
|
|||
return exp;
|
||||
|
||||
return fold_build1 (code, type,
|
||||
max_size (TREE_OPERAND (exp, 0), max_p));
|
||||
max_size (TREE_OPERAND (exp, 0),
|
||||
code == TRUTH_NOT_EXPR ? !max_p : max_p));
|
||||
|
||||
case 2:
|
||||
if (code == COMPOUND_EXPR)
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/discr47.adb: New test.
|
||||
|
||||
2017-02-24 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/79389
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
-- { dg-do run }
|
||||
-- { dg-options "-O -gnatws" }
|
||||
|
||||
procedure Discr47 is
|
||||
|
||||
type Rec (D : Boolean := False) is record
|
||||
case D is
|
||||
when True => null;
|
||||
when False => C : Character;
|
||||
end case;
|
||||
end record;
|
||||
|
||||
R : Rec;
|
||||
|
||||
begin
|
||||
if R'Size /= 16 then
|
||||
raise Program_Error;
|
||||
end if;
|
||||
end;
|
Loading…
Reference in New Issue