Bug 26439 - [4.2 Regression] missing VOPs for complex assignments
Summary: [4.2 Regression] missing VOPs for complex assignments
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: alias, wrong-code
Depends on:
Blocks: 26421
  Show dependency treegraph
 
Reported: 2006-02-23 12:13 UTC by Richard Biener
Modified: 2006-02-24 18:22 UTC (History)
1 user (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2006-02-23 12:13:38 UTC
_Complex double c;
_Complex double foo(void)
{
  _Complex double *cp = &c;
  __real c = __imag c;
  return *cp;
}

has in alias1:

foo ()
{
  complex double * cp;
  complex double D.1527;
  double D.1526;

<bb 2>:
  cp_1 = &c;
  #   VUSE <SFT.0_2>;
  D.1526_3 = IMAGPART_EXPR <c>;
  #   SFT.1_5 = V_MUST_DEF <SFT.1_4>;
  REALPART_EXPR <c> = D.1526_3;
  #   VUSE <SFT.1_5>;
  D.1527_6 = *cp_1;
  #   <retval>_8 = V_MUST_DEF <<retval>_7>;
  <retval> = D.1527_6;
  #   VUSE <<retval>_8>;
  return <retval>;

}

note how D.1527_6 = *cp_1; misses VUSE <SFT.0_2>
Comment 1 Richard Biener 2006-02-23 12:20:41 UTC
I'm working on a fix.  find_func_aliases needs to handle complex types like AGGREGATE_TYPE_P types.
Comment 2 Richard Biener 2006-02-23 16:03:52 UTC
Subject: Bug 26439

Author: rguenth
Date: Thu Feb 23 16:03:47 2006
New Revision: 111389

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111389
Log:
2006-02-23  Richard Guenther  <rguenther@suse.de>

	PR middle-end/26439
	* tree-ssa-structalias.c (find_func_aliases): Handle complex types
	like aggregate types.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-structalias.c

Comment 3 Richard Biener 2006-02-23 16:16:46 UTC
Fixed.
Comment 4 Andrew Pinski 2006-02-24 17:32:10 UTC
Actually I could not reproduce this with "4.2.0 20060221"?

Is it only with the patch to fix PR 26421?
Comment 5 Andrew Pinski 2006-02-24 17:34:08 UTC
Actually this looks like it is x86 specific.  Please next time add the target if you think it is x86 specific and also pelase mention this was also using the C++ front-end.
Comment 6 Andrew Pinski 2006-02-24 17:36:02 UTC
Actually I cannot reproduce this with "4.2.0 20060218" either on x86?  What were you doing to reproduce this?
Comment 7 Andrew Pinski 2006-02-24 17:46:45 UTC
(In reply to comment #6)
> Actually I cannot reproduce this with "4.2.0 20060218" either on x86?  What
> were you doing to reproduce this?

Or even the 20th.
Comment 8 Andrew Pinski 2006-02-24 18:22:41 UTC
Actually never mind I see the issue now but I still say this is a latent bug and not really my bug. 


And the patch is wrong anyways in general as most of those places really should have been testing
something like var_can_have_subvars instead of AGGREGATE_TYPE_P anyways.