PR libfortran/35036
* write_float.def (output_float): Add error checks for zero digits
after decimal point in E and D format specifiers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132510
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-02-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/35036
+ * write_float.def (output_float): Add error checks for zero digits
+ after decimal point in E and D format specifiers.
+
2008-02-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/35063
case FMT_E:
case FMT_D:
i = dtp->u.p.scale_factor;
+ if (d <= 0 && i == 0)
+ {
+ generate_error (&dtp->common, LIBERROR_FORMAT, "Precision not "
+ "greater than zero in format specifier 'E' or 'D'");
+ return;
+ }
+ if (i <= -d || i >= d + 2)
+ {
+ generate_error (&dtp->common, LIBERROR_FORMAT, "Scale factor "
+ "out of range in format specifier 'E' or 'D'");
+ return;
+ }
+
if (!zero_flag)
e -= i;
if (i < 0)