Bug 22333 - [4.1 Regression] ACATS FAIL c34007p c34007r c45282b spurious discriminant CONSTRAINT_ERROR
Summary: [4.1 Regression] ACATS FAIL c34007p c34007r c45282b spurious discriminant CON...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 4.1.0
: P5 critical
Target Milestone: 4.1.0
Assignee: Eric Botcazou
URL:
Keywords: alias, wrong-code
: 24898 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-06 22:57 UTC by Laurent GUERBY
Modified: 2005-11-17 21:05 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-11-11 10:32:52


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent GUERBY 2005-07-06 22:57:53 UTC
On x86_64-linux as of
LAST_UPDATED: Wed Jul  6 13:35:26 UTC 2005

RUN c34007p

raised CONSTRAINT_ERROR : c34007p.adb:83 discriminant check failed

RUN c34007r

raised CONSTRAINT_ERROR : c34007r.adb:80 discriminant check failed

RUN c45282b

,.,. C45282B ACATS 2.5 05-07-06 17:16:11
---- C45282B CHECK THAT IN AND NOT IN ARE EVALUATED FOR ACCESS TYPES TO
                RECORD TYPES, PRIVATE TYPES, LIMITED PRIVATE TYPES WITH
                DISCRIMINANTS, AND TASK TYPES.

raised CONSTRAINT_ERROR : c45282b.adb:170 discriminant check failed
Comment 1 Andrew Pinski 2005-07-07 00:45:16 UTC
I wonder if this is caused by (my patch):
2005-07-02  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/14490
        * fold-const.c (fold_binary): Handle the return value of
        fold_to_nonsharp_ineq_using_bound if we get back the same operand back.
        Implement "X +- C1 CMP C2" folding to "X CMP C2 -+ C1".

But I have to double check,  I thought I had tested it with Ada but I cannot remember for sure.
Comment 2 Andrew Pinski 2005-07-09 20:17:46 UTC
Nope it was not my change as that would mean -fwrapv fix it but it did not.  Though it looks like my 
patch actually helps code generation here.
Comment 3 Andrew Pinski 2005-07-09 20:25:17 UTC
Another missing V_MAY_DEF:
  #   VUSE <C.1_33>;
  #   VUSE <TMT.91_386>;
  VIEW_CONVERT_EXPR<struct c34007r__T8b>(*D.839) = C.1;
Comment 4 Diego Novillo 2005-09-08 18:37:41 UTC
What's the status of this bug?
Comment 5 Andrew Pinski 2005-09-08 18:42:54 UTC
Thread starts:
http://gcc.gnu.org/ml/gcc/2005-09/msg00102.html

From the looks of the thread it looks more likely a front-end bug rather than a tree-opt bug.
Comment 6 Diego Novillo 2005-09-08 18:47:29 UTC
(In reply to comment #5)
> Thread starts:
> http://gcc.gnu.org/ml/gcc/2005-09/msg00102.html
> 
> From the looks of the thread it looks more likely a front-end bug rather than
a tree-opt bug.

Thanks.
Comment 7 Laurent GUERBY 2005-10-13 05:09:55 UTC
Note: works at -O0 on x86-linux and x86_64-linux
Comment 8 Eric Botcazou 2005-11-11 10:32:52 UTC
Investigating.
Comment 9 Laurent GUERBY 2005-11-14 07:44:42 UTC
Eric, I believe Richard Kenner has a fix for this one.
Comment 10 Eric Botcazou 2005-11-14 07:54:20 UTC
> Eric, I believe Richard Kenner has a fix for this one.

Great.  I've one too, but it is in Gigi.
Comment 11 Eric Botcazou 2005-11-16 17:48:34 UTC
*** Bug 24898 has been marked as a duplicate of this bug. ***
Comment 12 Eric Botcazou 2005-11-17 21:03:53 UTC
Subject: Bug 22333

Author: ebotcazou
Date: Thu Nov 17 21:03:50 2005
New Revision: 107134

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107134
Log:
	PR ada/22333
	* trans.c (gnat_gimplify_expr, case ADDR_EXPR): Always make
	a temporary if taking the address of something that is neither
	reference, declaration, or constant, since the gimplifier
	can't handle that case.


Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/trans.c

Comment 13 Eric Botcazou 2005-11-17 21:05:23 UTC
See http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01311.html