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 target/39558] New: Fortran iresolve.c cannot be built with -maltivec used in bootstrap


Adding -maltivec to the PowerPC compiler turns on the altivec vector support. 
Part of the vector support is to add conditional expansion of the vector
keyword if it looks like vector is part of a type declaration (i.e. vector
float would declare a single precision floating point 4 element vector, or
V4SF).  If the next thing after vector is a macro that expands to
__attribute__((__unused__)), the compiler will realize that it should expand
vector to vector, and then glue it with the __attribute__.  I discovered this
when doing a bootstrap of the compiler with the power7 VSX instructions enabled
(VSX includes Altivec).

This is the declaration in fortran/iresolve.c that shows the problem:
 void
gfc_resolve_pack (gfc_expr *f, gfc_expr *array, gfc_expr *mask,
                  gfc_expr *vector ATTRIBUTE_UNUSED)
{
   /* ... */
}

If we change the argument to something other than vector, it will allow the
code to be compiled with -maltivec, but the underlying problem should be fixed.


-- 
           Summary: Fortran iresolve.c cannot be built with -maltivec used
                    in bootstrap
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: meissner at linux dot vnet dot ibm dot com
 GCC build triplet: powerpc64-unknown-linux-gnu
  GCC host triplet: powerpc64-unknown-linux-gnu
GCC target triplet: powerpc64-unknown-linux-gnu


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


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