This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug c/22371] C front-end produces mis-match types in MODIFY_EXPR



------- Comment #7 from rguenth at gcc dot gnu dot org  2007-08-22 10:07 -------
Is the following valid?

typedef int IA[];
typedef int A5[5];
typedef int A10[10];

A5 array5;

A10 *ap;
void
f (void)
{
  int ap;
  {
    extern IA *ap;

    ap = &array5;
  }
}

The real problem is that the frontend creates a conversion to (int[] *) rather
than (A5 *) which is the type of ap at gimplification time.  The patch
doesn't address this, but merely forces the conversion to (int[] *) which is
there also without the patch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22371


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