Commit 7a852b96 by Georg-Johann Lay Committed by Georg-Johann Lay

20120111-1.c: Fix wrong int = int32_t assumption.

	* gcc.c-torture/execute/20120111-1.c: Fix wrong int = int32_t
	assumption.
	* g++.dg/ipa/pr51759.C: Fix assumption sizeof(int) > 2.
	* gcc.dg/cpp/warn-multichar.c: Fix to work on int=16 platforms.
	* gcc.dg/cpp/warn-multichar-2.c: Ditto.
	* gcc.dg/debug/dwarf2/pr49871.c: Add dg-require-effective-target
	int32plus because of big array needed.
	* gcc.dg/pr50527.c: Don't FAIL if sizeof(void*) = 2
	* gcc.dg/lto/20090218-2_1.c: Fix prototype of malloc, memcpy.

From-SVN: r183158
parent fc970532
2012-01-13 Georg-Johann Lay <avr@gjlay.de>
* gcc.c-torture/execute/20120111-1.c: Fix wrong int = int32_t
assumption.
* g++.dg/ipa/pr51759.C: Fix assumption sizeof(int) > 2.
* gcc.dg/cpp/warn-multichar.c: Fix to work on int=16 platforms.
* gcc.dg/cpp/warn-multichar-2.c: Ditto.
* gcc.dg/debug/dwarf2/pr49871.c: Add dg-require-effective-target
int32plus because of big array needed.
* gcc.dg/pr50527.c: Don't FAIL if sizeof(void*) = 2
* gcc.dg/lto/20090218-2_1.c: Fix prototype of malloc, memcpy.
2012-01-13 Jason Merrill <jason@redhat.com>
PR c++/51813
......
/* { dg-do run } */
/* { dg-options "-O2" } */
#if __SIZEOF_INT__ == 2 && __SIZEOF_LONG__ == 4
#define unsigned unsigned long
#endif
extern "C" void abort (void);
struct S
{
......
......@@ -6,7 +6,7 @@ uint32_t f0a (uint64_t arg2) __attribute__((noinline));
uint32_t
f0a (uint64_t arg)
{
return ~(arg > -3);
return ~((unsigned) (arg > -3));
}
int main() {
......
// { dg-do preprocess }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=multichar" }
/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
#if 'abc' // { dg-error "multi-character character constant .-Werror=multichar." }
#if 'ab' // { dg-error "multi-character character constant .-Werror=multichar." }
#endif
// { dg-do preprocess }
// { dg-options "-std=gnu99 -fdiagnostics-show-option -Wmultichar" }
#if 'abc' // { dg-warning "multi-character character constant .-Wmultichar." }
#if 'ab' // { dg-warning "multi-character character constant .-Wmultichar." }
#endif
......@@ -4,8 +4,8 @@ int main(void)
{
return 0;
}
void *malloc(unsigned long size);
void *memcpy(void *dest, const void *src, unsigned long n);
void *malloc(__SIZE_TYPE__ size);
void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n);
static mem_attrs * get_mem_attrs () {
void **slot;
*slot = malloc (3);
......
/* { dg-do run } */
/* { dg-options "-Os --param large-stack-frame=30" } */
/* { dg-options "-Os --param large-stack-frame=30 -Wno-pointer-to-int-cast" } */
extern void abort (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment