+2017-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/79886
+ * tree-diagnostic.c (default_tree_printer): No longer static.
+ * tree-diagnostic.h (default_tree_printer): New prototype.
+
2017-03-16 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
+2017-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/79886
+ * error.c (gfc_format_decoder): Rename plus argument to set_locus,
+ remove ATTRIBUTE_UNUSED from all arguments, call default_tree_printer
+ if not a Fortran specific spec.
+ * trans-io.c: Include options.h.
+ (gfc_build_st_parameter): Temporarily disable -Wpadded around layout
+ of artificial IO data structures.
+
2017-03-15 David Malcolm <dmalcolm@redhat.com>
PR fortran/79860
%L Takes locus argument
*/
static bool
-gfc_format_decoder (pretty_printer *pp,
- text_info *text, const char *spec,
- int precision ATTRIBUTE_UNUSED, bool wide ATTRIBUTE_UNUSED,
- bool plus ATTRIBUTE_UNUSED, bool hash ATTRIBUTE_UNUSED)
+gfc_format_decoder (pretty_printer *pp, text_info *text, const char *spec,
+ int precision, bool wide, bool set_locus, bool hash)
{
switch (*spec)
{
return true;
}
default:
- return false;
+ /* Fall through info the middle-end decoder, as e.g. stor-layout.c
+ etc. diagnostics can use the FE printer while the FE is still
+ active. */
+ return default_tree_printer (pp, text, spec, precision, wide,
+ set_locus, hash);
}
}
#include "trans-array.h"
#include "trans-types.h"
#include "trans-const.h"
+#include "options.h"
/* Members of the ioparm structure. */
gcc_unreachable ();
}
+ /* -Wpadded warnings on these artificially created structures are not
+ helpful; suppress them. */
+ int save_warn_padded = warn_padded;
+ warn_padded = 0;
gfc_finish_type (t);
+ warn_padded = save_warn_padded;
st_parameter[ptype].type = t;
}
+2017-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/79886
+ * gfortran.dg/pr79886.f90: New test.
+
2017-03-15 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/79038
--- /dev/null
+! PR fortran/79886
+! { dg-do compile }
+! { dg-options "-Wpadded" }
+
+subroutine pr79886
+ type :: foo
+ integer (kind=1) :: a
+ integer (kind=8) :: b ! { dg-warning "padding struct to align" }
+ integer (kind=1) :: c
+ integer (kind=8) :: d ! { dg-warning "padding struct to align" }
+ end type
+ type (foo) :: f
+ f%a = 1
+ f%b = 2
+ f%c = 3
+ f%d = 4
+end subroutine
}
/* Default tree printer. Handles declarations only. */
-static bool
+bool
default_tree_printer (pretty_printer *pp, text_info *text, const char *spec,
int precision, bool wide, bool set_locus, bool hash)
{
diagnostic_info *);
void tree_diagnostics_defaults (diagnostic_context *context);
+bool default_tree_printer (pretty_printer *, text_info *, const char *,
+ int, bool, bool, bool);
+
#endif /* ! GCC_TREE_DIAGNOSTIC_H */