This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

VIEW_CONVERT_EXPR vs alias pass

If we have the following IR (before the first may_alias pass):
f1 (a)
  short int b;
  short unsigned int b.2;
  short int b.1;
  int D.1525;
  short unsigned int a.0;

<bb 2>:
  a.0_2 = (short unsigned int) a_1;
  #   b_4 = V_MUST_DEF <b_3>;
  VIEW_CONVERT_EXPR<short unsigned int>(b) = a.
  b.1_5 = b;
  b.2_6 = (short unsigned int) b.1_5;
  D.1525_7 = (int) b.2_6;
  return D.1525_7;


The may_alias pass removes the TREE_ADDRESSABLE on b so we ICE in the
checking pass after may_alias runs.  Does someone have an idea on where
it is going wrong?

I am trying to fix PR 26069 but am running into this ICE for the
following code:
unsigned short f1(short a)
  short b;
  *(unsigned short*)&b = a;
  return b;

I don't know if this problem shows up in Ada code but it seems like it
The error I get is:
t.c: In function âf1â:
t.c:11: error: statement makes a memory store, but has no V_MAY_DEFS nor
VIEW_CONVERT_EXPR<short unsigned int>(b_9) = a.0_2;
t.c:11: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.

Andrew Pinski

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]