Backport PRs 41182, 41555, 41570, 41573, 41634, 41683
2009-10-15 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline: 2009-10-13 Martin Jambor <mjambor@suse.cz> * gcc.c-torture/compile/pr41661.c: New test. 2009-10-12 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/41683 * gfortran.dg/fmt_error_9.f: Add check for repeat count after P. 2009-10-12 Dodji Seketeli <dodji@redhat.com> PR c++/41570 * g++.dg/debug/dwarf2/template-params-7.C: New test. 2009-10-11 Richard Guenther <rguenther@suse.de> PR tree-optimization/41555 * gcc.dg/torture/pr41555.c: New testcase. 2009-10-09 Richard Guenther <rguenther@suse.de> PR tree-optimization/41634 * gcc.c-torture/compile/pr41634.c: New testcase. 2009-10-08 Michael Matz <matz@suse.de> PR middle-end/41573 * gcc.dg/pr41573.c: New test. 2009-10-07 Joseph Myers <joseph@codesourcery.com> PR c/41182 * gcc.c-torture/compile/pr41182-1.c: New. From-SVN: r152870
This commit is contained in:
parent
aa7faccef6
commit
f18a6f46b4
|
@ -1,3 +1,40 @@
|
|||
2009-10-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Backport from mainline:
|
||||
2009-10-13 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* gcc.c-torture/compile/pr41661.c: New test.
|
||||
|
||||
2009-10-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR libgfortran/41683
|
||||
* gfortran.dg/fmt_error_9.f: Add check for repeat count after P.
|
||||
|
||||
2009-10-12 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR c++/41570
|
||||
* g++.dg/debug/dwarf2/template-params-7.C: New test.
|
||||
|
||||
2009-10-11 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/41555
|
||||
* gcc.dg/torture/pr41555.c: New testcase.
|
||||
|
||||
2009-10-09 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/41634
|
||||
* gcc.c-torture/compile/pr41634.c: New testcase.
|
||||
|
||||
2009-10-08 Michael Matz <matz@suse.de>
|
||||
|
||||
PR middle-end/41573
|
||||
* gcc.dg/pr41573.c: New test.
|
||||
|
||||
2009-10-07 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
PR c/41182
|
||||
* gcc.c-torture/compile/pr41182-1.c: New.
|
||||
|
||||
2009-10-15 Release Manager
|
||||
|
||||
* GCC 4.4.2 released.
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR debug/30161
|
||||
// { dg-options "-std=c++0x -g -dA -fno-merge-debug-strings" }
|
||||
|
||||
// The type M<> should have one DW_TAG_GNU_template_parameter_pack DIE,
|
||||
// with no DW_AT_name attribute. We don't test the fact that it has no
|
||||
// DW_AT_name though.
|
||||
// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_parameter_pack" 1 } }
|
||||
|
||||
|
||||
template <typename...>
|
||||
struct M
|
||||
{
|
||||
};
|
||||
|
||||
struct R :
|
||||
M<>
|
||||
{
|
||||
};
|
||||
|
||||
R r;
|
|
@ -0,0 +1,6 @@
|
|||
typedef long unsigned int size_t;
|
||||
int _lae_process_opts(char *pr, char *pe)
|
||||
{
|
||||
return (strlen ("on") < ((size_t) ((pe-&pr[2])>(strlen("on"))
|
||||
? (pe-&pr[2]) : (strlen("on")))));
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
extern int _xgetw();
|
||||
extern int foo(char*);
|
||||
|
||||
void test_readmode( int ascii_mode )
|
||||
{
|
||||
static const char outbuffer[]
|
||||
= "0,1,2,3,4,5,6,7,8,9\r\n\r\nA,B,C,D,E\r\nX,Y,Z";
|
||||
char buffer[2*512 +256];
|
||||
int i, j, ao;
|
||||
unsigned int fp;
|
||||
|
||||
foo(buffer);
|
||||
|
||||
for (i=0, j=0; i<6; i++) {
|
||||
if (ao==0 || outbuffer[fp-3+i] != '\r')
|
||||
buffer[j++] = outbuffer[fp-3+i];
|
||||
}
|
||||
_xgetw();
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/* PR tree-optimization/41661 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fno-early-inlining" } */
|
||||
|
||||
int g;
|
||||
|
||||
void foo (int x)
|
||||
{
|
||||
g = x;
|
||||
}
|
||||
|
||||
void bar (double d)
|
||||
{
|
||||
foo (d == 1);
|
||||
}
|
||||
|
||||
void baz (int a)
|
||||
{
|
||||
bar (1);
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2" } */
|
||||
__inline __attribute__ ((__always_inline__)) char *
|
||||
strcpy (char *__dest, __const char *__src)
|
||||
{
|
||||
return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
|
||||
}
|
||||
|
||||
const char* get_attr(unsigned attr)
|
||||
{
|
||||
static char tmp[256];
|
||||
|
||||
strcpy(tmp, "");
|
||||
return tmp;
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-std=c99" } */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <limits.h>
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
static uint64_t safe_div_func_uint64_t_u_u (uint64_t _ui1, uint64_t _ui2)
|
||||
{
|
||||
if (_ui2==0) return _ui1;
|
||||
return _ui1 / _ui2;
|
||||
}
|
||||
|
||||
static int64_t safe_div_func_int64_t_s_s (int64_t _si1, int64_t _si2)
|
||||
{
|
||||
if (_si2==0 || (_si1==INT64_MIN && _si2==-1)) return _si1;
|
||||
return _si1 / _si2;
|
||||
}
|
||||
|
||||
#define safe_add_macro_int8_t_s_s(si1,si2) \
|
||||
((((((int8_t)(si1))>((int8_t)0)) && (((int8_t)(si2))>((int8_t)0)) && (((int8_t)(si1)) > ((INT8_MAX)-((int8_t)(si2))))) \
|
||||
|| ((((int8_t)(si1))<((int8_t)0)) && (((int8_t)(si2))<((int8_t)0)) && (((int8_t)(si1)) < ((INT8_MIN)-((int8_t)(si2)))))) \
|
||||
? ((int8_t)(si1)) \
|
||||
: (((int8_t)(si1)) + ((int8_t)(si2))) \
|
||||
)
|
||||
|
||||
static int8_t
|
||||
safe_add_func_int8_t_s_s(int8_t _si1, int8_t _si2)
|
||||
{
|
||||
return safe_add_macro_int8_t_s_s(_si1,_si2);
|
||||
}
|
||||
|
||||
#define safe_rshift_macro_uint64_t_u_s(left,right) \
|
||||
(((((int)(right)) < ((uint64_t)0)) \
|
||||
|| (((int)(right)) >= sizeof(uint64_t)*CHAR_BIT)) \
|
||||
? ((uint64_t)(left)) \
|
||||
: (((uint64_t)(left)) >> ((int)(right))))
|
||||
|
||||
static uint64_t
|
||||
safe_rshift_func_uint64_t_u_s(uint64_t _left, int _right)
|
||||
{
|
||||
return safe_rshift_macro_uint64_t_u_s(_left,_right);
|
||||
}
|
||||
|
||||
#define safe_mul_macro_int32_t_s_s(si1,si2) \
|
||||
((((((int32_t)(si1)) > ((int32_t)0)) && (((int32_t)(si2)) > ((int32_t)0)) && (((int32_t)(si1)) > ((INT32_MAX) / ((int32_t)(si2))))) || \
|
||||
((((int32_t)(si1)) > ((int32_t)0)) && (((int32_t)(si2)) <= ((int32_t)0)) && (((int32_t)(si2)) < ((INT32_MIN) / ((int32_t)(si1))))) || \
|
||||
((((int32_t)(si1)) <= ((int32_t)0)) && (((int32_t)(si2)) > ((int32_t)0)) && (((int32_t)(si1)) < ((INT32_MIN) / ((int32_t)(si2))))) || \
|
||||
((((int32_t)(si1)) <= ((int32_t)0)) && (((int32_t)(si2)) <= ((int32_t)0)) && (((int32_t)(si1)) != ((int32_t)0)) && (((int32_t)(si2)) < ((INT32_MAX) / ((int32_t)(si1)))))) \
|
||||
? ((int32_t)(si1)) \
|
||||
: ((int32_t)(si1)) * ((int32_t)(si2)))
|
||||
|
||||
static int32_t
|
||||
safe_mul_func_int32_t_s_s (int32_t _si1, int32_t _si2)
|
||||
{
|
||||
return safe_mul_macro_int32_t_s_s(_si1,_si2);
|
||||
}
|
||||
|
||||
static int8_t g_39;
|
||||
static volatile uint8_t g_46;
|
||||
static uint8_t g_47;
|
||||
static uint8_t *g_62;
|
||||
static uint8_t g_79;
|
||||
static int8_t g_101 = -1L;
|
||||
static uint8_t *g_114;
|
||||
static uint8_t *g_126;
|
||||
static uint8_t g_133;
|
||||
|
||||
static uint16_t func_35 (int32_t * p_36, uint64_t p_37, uint32_t p_38);
|
||||
static uint16_t func_35 (int32_t * p_36, uint64_t p_37, uint32_t p_38)
|
||||
{
|
||||
if (g_62 != 0)
|
||||
abort ();
|
||||
for (g_39 = 1; g_39 < 0; g_39 = 1)
|
||||
{
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int32_t func_19 (int32_t p_20);
|
||||
static int32_t func_19 (int32_t p_20)
|
||||
{
|
||||
if (1 !=
|
||||
safe_div_func_uint64_t_u_u ((safe_div_func_int64_t_s_s (p_20, 1)),
|
||||
g_101))
|
||||
{
|
||||
func_35 (0, 1 <= (safe_add_func_int8_t_s_s (g_47, g_46)) > p_20 < 1, 1);
|
||||
g_133 = 1;
|
||||
if (g_114 != 0)
|
||||
abort ();
|
||||
if (g_126 != 0)
|
||||
abort ();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static uint8_t func_2 (int32_t p_6);
|
||||
static uint8_t func_2 (int32_t p_6)
|
||||
{
|
||||
for (1; p_6 > 1; 1)
|
||||
return 0;
|
||||
func_19 (g_79);
|
||||
if (safe_mul_func_int32_t_s_s
|
||||
((0, 1 < (safe_rshift_func_uint64_t_u_s (1 ^ p_6, 1))),
|
||||
(func_35 (&p_6, 1, 1) < 1)))
|
||||
{
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
func_2 (1);
|
||||
if (g_133 != 1)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
! { dg-do run }
|
||||
! { dg-options "-std=gnu" }
|
||||
! PR38439 I/O PD edit descriptor inconsistency
|
||||
! Test case prepared by Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
character(len=25) :: str
|
||||
character(len=132) :: msg, line
|
||||
str = '(1pd24.15e6)'
|
||||
line = "initial string"
|
||||
x = 555.25
|
||||
|
||||
write (line,str,iostat=istat, iomsg=msg) 1.0d0, 1.234
|
||||
if (istat.ne.5006 .or. msg(1:15).ne."Period required") call abort
|
||||
if (line.ne."initial string") call abort
|
||||
|
||||
str = '(1pf0.15)'
|
||||
write (line,str,iostat=istat, iomsg=msg) 1.0d0
|
||||
if (istat.ne.0) call abort
|
||||
read (*,str,iostat=istat, iomsg=msg) x
|
||||
if (istat.ne.5006 .or. msg(1:15).ne."Positive width ") call abort
|
||||
if (x.ne.555.25) call abort
|
||||
|
||||
write (line,'(1pd24.15e11.3)') 1.0d0, 1.234
|
||||
if (line.ne." 1.000000000000000D+00 1.234E+00") call abort
|
||||
|
||||
str = '(1p2d24.15)'
|
||||
msg = " 1.000000000000000D+00 1.233999967575073D+00That's it!"
|
||||
write (line,'(1p2d24.15a)') 1.0d0, 1.234, "That's it!"
|
||||
if (line.ne.msg) print *, msg
|
||||
end
|
Loading…
Reference in New Issue