[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #23 from ebotcazou at gcc dot gnu dot org 2006-01-25 14:07 --- Subject: Bug 18819 Author: ebotcazou Date: Wed Jan 25 14:06:59 2006 New Revision: 110213 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110213 Log: PR ada/18819 * exp_util.adb (Remove_Side_Effects): Lift enclosing type conversion nodes for elementary types in all cases. Modified: branches/gcc-4_1-branch/gcc/ada/ChangeLog branches/gcc-4_1-branch/gcc/ada/exp_util.adb -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #22 from ebotcazou at gcc dot gnu dot org 2006-01-23 15:15 --- > That's not really an option, since these files must be compiled with > -gnato (well at least report.adb) for proper operation of some ACATS tests. Agreed. Can I install the front-end fix on the 4.1 branch then? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #21 from charlet at adacore dot com 2006-01-23 15:12 --- Subject: Re: [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime > No real solution as of this writing, only a poor workaround: not compiling the > support files with -gnato (overflow checks). That's not really an option, since these files must be compiled with -gnato (well at least report.adb) for proper operation of some ACATS tests. Arno -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #20 from ebotcazou at gcc dot gnu dot org 2006-01-22 22:29 --- (From update of attachment 10701) Probably too gross. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added Attachment #10701|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #19 from ebotcazou at gcc dot gnu dot org 2006-01-22 16:31 --- Created an attachment (id=10706) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10706&action=view) Other patch for miscompilation on s390x. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #18 from ebotcazou at gcc dot gnu dot org 2006-01-22 11:44 --- Created an attachment (id=10701) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10701&action=view) Patch for miscompilation on s390x. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |ebotcazou at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #17 from ebotcazou at gcc dot gnu dot org 2006-01-22 11:43 --- > No real solution as of this writing, only a poor workaround: not compiling the > support files with -gnato (overflow checks). Well, I may have spoken too soon. :-) We are calling Remove_Side_Effects on: N_Type_Conversion (Node_Id=1679) (analyzed) Rewritten: original node = N_Op_Add "Oadd" (Node_Id=39499) Parent = N_Range (Node_Id=1681) Sloc = 7611 fdd2a00.adb:6:38 Etype = N_Defining_Identifier "Tstream_element_offsetB" (Entity_Id=2017) Subtype_Mark = N_Identifier "Tstream_element_offsetB" (Node_Id=39497) Expression = N_Function_Call (Node_Id=39496) Conversion_OK = True It turns out that the fix is already present in the front-end, but inhibited: -- If this is a type conversion, leave the type conversion and remove -- the side effects in the expression. This is important in several -- circumstances: for change of representations, and also when this -- is a view conversion to a smaller object, where gigi can end up -- creating its own temporary of the wrong size. -- ??? this transformation is inhibited for elementary types that are -- not involved in a change of representation because it causes -- regressions that are not fully understood yet. elsif Nkind (Exp) = N_Type_Conversion and then (not Is_Elementary_Type (Underlying_Type (Exp_Type)) or else Nkind (Parent (Exp)) = N_Assignment_Statement) then Remove_Side_Effects (Expression (Exp), Name_Req, Variable_Ref); Scope_Suppress := Svg_Suppress; return; However, another possible fix is to make a copy when we know we will not be able to use a renaming. Tentative patch to be attached. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #16 from ebotcazou at gcc dot gnu dot org 2006-01-22 10:19 --- > Any ideas why this would be the case? The types are not supposed to alias each other. The lines in the .dg file are: R8b : fdd2a00__write__A7b__2 := ada__streams__Tstream_element_offsetB?( system__arith_64__add_with_ovflo_check (interfaces__integer_64 ?(stream.last), interfaces__integer_64?( ada__streams__Tstream_element_offsetB(item'length'reference; [constraint_error when R8b.all >= R5b.all and then (R5b.all < 1 or else R8b.all > ada__streams__Tstream_element_offsetB(R3b)) "range check failed"] ada/trans.c:3053 case N_Reference: /* Like 'Access as far as we are concerned. */ gnu_result = gnat_to_gnu (Prefix (gnat_node)); gnu_result = build_unary_op (ADDR_EXPR, NULL_TREE, gnu_result); gnu_result_type = get_unpadded_type (Etype (gnat_node)); break; These N_Reference nodes are an endless source of problems because they cause gigi to take the address of objects that are not aliased. We have been working towards eliminating them as much as possible by using renaming instead; this case (check on the result of a function call) is probably the most delicate one. No real solution as of this writing, only a poor workaround: not compiling the support files with -gnato (overflow checks). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #15 from laurent at guerby dot net 2006-01-21 09:32 --- 4.2 fails on amd64-linux as of Fri Jan 20 20:40:28 UTC 2006 (revision 110036) http://gcc.gnu.org/ml/gcc-testresults/2006-01/msg01071.html RUN cdd2a02 ,.,. CDD2A02 ACATS 2.5 06-01-23 01:01:16 CDD2A02 Check that the Read, Write, Input, and Output attributes are inherited for untagged derived types. * CDD2A02 Inherited Input and Output are not inverses of each other - 4. CDD2A02 FAILED . -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #14 from uweigand at gcc dot gnu dot org 2006-01-20 18:39 --- Some additional details about the s390x failure. This is caused by a miscompile of the fdd2a00__write__2 support routine: lg %r4,168(%r15) # 35*movdi_64/8 [length = 6] lg %r3,160(%r15) # 36*movdi_64/8 [length = 6] cgr %r4,%r3 # 37*cmpdi_ccs/1[length = 4] stg %r2,168(%r15) # 33*movdi_64/9 [length = 6] Note how insn 35 reads a stack slot that is uninitialized because insn 33 has been scheduled later. This is apparently caused by an alias set issue. The code at the .t97.final_cleanup level reads: A.63 = system__arith_64__add_with_ovflo_check (D.1421, D.1426); R38b = (ada__streams__Tstream_element_offsetB *) &A.63; where the data type of A.63 is system__arith_64__int64. This gets expanded into (insn 32 31 33 3 (set (reg:DI 60) (reg:DI 2 %r2)) -1 (nil) (nil)) (insn 33 32 34 3 (set (mem/c/i:DI (plus:DI (reg/f:DI 39 virtual-stack-vars) (const_int -8 [0xfff8])) [26 A.63+0 S8 A64]) (reg:DI 60)) -1 (nil) (nil)) (insn 34 33 35 3 (parallel [ (set (reg:DI 43 [ R38b ]) (plus:DI (reg/f:DI 39 virtual-stack-vars) (const_int -8 [0xfff8]))) (clobber (reg:CC 33 %cc)) ]) -1 (nil) (nil)) (insn 35 34 36 3 (set (reg:DI 48 [ D.1430 ]) (mem:DI (reg:DI 43 [ R38b ]) [27 S8 A64])) -1 (nil) (nil)) Note alias set 26 in insn 33 vs. alias set 27 in insn 35. Any ideas why this would be the case? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819
[Bug ada/18819] [4.1/4.2 Regression] ACATS cdd2a01 cdd2a02 fail at runtime
--- Comment #13 from laurent at guerby dot net 2006-01-17 19:02 --- http://gcc.gnu.org/ml/gcc-testresults/2006-01/msg00663.html cdda01 fails on s390-linux on 4.1 with tree-sra disabled. ,.,. CDD2A01 ACATS 2.5 06-01-16 19:32:21 CDD2A01 Check that the Read and Write attributes for a type extension are created from the parent type's attribute (which may be user-defined) and those for the extension components; also check that the default input and output attributes are used for a type extension, even if the parent type's attribute is user-defined. raised CONSTRAINT_ERROR : fdd2a00.adb:29 range check failed FAIL: cdd2a01 ,.,. CDD2A02 ACATS 2.5 06-01-16 19:32:25 CDD2A02 Check that the Read, Write, Input, and Output attributes are inherited for untagged derived types. raised CONSTRAINT_ERROR : fdd2a00.adb:29 range check failed FAIL: cdd2a02 -- laurent at guerby dot net changed: What|Removed |Added Summary|[4.2 Regression] ACATS |[4.1/4.2 Regression] ACATS |cdd2a02 fails at runtime|cdd2a01 cdd2a02 fail at ||runtime http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18819