From patchwork Fri Nov 10 22:06:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 164002 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1411776vqs; Fri, 10 Nov 2023 14:07:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEXA6WCigzcM9xleW/tbfWRCfNkVCagvf9PZEm7QT0CTgAOokL5yN+CPYOS7nNxInjsJdkN X-Received: by 2002:a05:6358:4419:b0:16b:bf8e:8f6e with SMTP id z25-20020a056358441900b0016bbf8e8f6emr515393rwc.11.1699654026169; Fri, 10 Nov 2023 14:07:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699654026; cv=pass; d=google.com; s=arc-20160816; b=EiVxsvEfC2L118UeIduZu1l96p55/y+FEVIu81xTMPcfQAy6J1PcyI30RrxQhtUCrG YhhVRNYsUSg703KaYZTVFOivb68K/i97DHlq4PMuwhGnfTdVPTqEX9Rnvr+y4c7wWazm uqeg5AREeYKEX1BKIoidhTDQ+dSDEYuD/KOR0OTQ+R6WdgXE4wlt9Gd5gXp1ppjLb4gq debg3GTjhSmIbyamm0NTZAENaWAZJTIkzTHT5yTJgPJn8/ixwlfUWB860fIuLHeF2nOW 7zPjnvQUWIEATLxm755XCBQNDy8eHO9l/u303hgSW3PjRRzOLv1ch7jwtLex5pEmqzjh JX0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:to:from:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=0fGN2XR2GcOO7voJBgGRgUoaEItCPj9FhAiWU9R46CI=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=Q1liOk7WDhGQ0+Df0x/L9QupOPOMVvgtVwZ5vvyxfwq+j83XSSEEIG+iiEPme82h7M +9krnJWWBSuFbDC7zccVNCywxIXyuISXtTVN68Ro5tXlHLHEWf6c8Fyg0HdKa92vBUTq xmN8yddQ+tY4HXhXyfgJMWjPQwB8CBgwBATpBMAEDzy6sd6Vn6go8URgzv6r6dcPtfZr hJNmsmvuRL51VOyMKYZWs29U84HUOZfyADAGgvm8Iim3/MrymfG6AznXYhhx3hUBQbuW nnU88Yl5enQX+gyRXorlhoRAu3Fj4qP4NDSaZZGj7XlyqXdC3l5Km0eaM690ZG6uPZ+3 JbmA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Il7sj+dR; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id f2-20020a05622a1a0200b004196b9a23absi372667qtb.145.2023.11.10.14.07.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 14:07:06 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Il7sj+dR; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E548038582A1 for ; Fri, 10 Nov 2023 22:07:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9AB813858414 for ; Fri, 10 Nov 2023 22:06:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9AB813858414 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9AB813858414 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699654001; cv=none; b=XPTu0ZXsceXwi4TCklHRBlQiqy/U4lnc0DEP5TfF97Gis10ffVoiq3iwj11X9/olIAclSixeoPQkvSQ+h9F3jyUjFyX5xbnlVxA9xuUq5WkGrar/A30FDoeryAgsR0GuOEN0U+4dvmYdd8myFo+qrkSlFrjCCysvEbZVBbL2C8I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699654001; c=relaxed/simple; bh=5k0Fb7pn+S08y4LPUfvUkcapm2fXY9GLLNoHT/UeSAM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=k4zXJ0C6QyL40D0ej4VECpHaP9v9zhlCNNtVNNa9uIgnxq5RIt4E3yednR3ebDcUIClbnJ0jwOUBRJS54P5I+c9Eek4X7TdDls7U4ROed0goq1WXZ3NVMpxj9VYacd2nO5hZSSbOdoJOTynSEv4cl1AZqLWaput78S0VYcufFfs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699653996; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=0fGN2XR2GcOO7voJBgGRgUoaEItCPj9FhAiWU9R46CI=; b=Il7sj+dRo/9BcC+ek+7VoYgmWHlGwViliNUj9rxPCh4leiPKyWlHKHTNdYWgGz/pMqmk3F flNuGSBeQTmYgMLf84TqCL7ZYtCfujozqCmSUPkVd3Qw+zzW/kh1p9hJudYimrMkzRTAHA wlwHOtUAvxnEjd2MuC1PRnufeHmBgC8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-CE0wIKokNg6TC_OhD55x1w-1; Fri, 10 Nov 2023 17:06:34 -0500 X-MC-Unique: CE0wIKokNg6TC_OhD55x1w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6A3253C14769 for ; Fri, 10 Nov 2023 22:06:34 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B7B0E1121306 for ; Fri, 10 Nov 2023 22:06:33 +0000 (UTC) From: Florian Weimer To: gcc-patches@gcc.gnu.org Subject: [PATCH] C99 testsuite readiness: Verified un-reductions Date: Fri, 10 Nov 2023 23:06:32 +0100 Message-ID: <87h6lt461j.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SCC_5_SHORT_WORD_LINES, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782216420021332298 X-GMAIL-MSGID: 1782216420021332298 gcc/testsuite/ * gcc.c-torture/compile/20080613-1.c (hop_sendmsg): Call __builtin_memcpy instead of memcpy. * gcc.c-torture/compile/complex-6.c (bar): Declare. * gcc.c-torture/compile/pr23445.c (__brelse): Declare. * gcc.c-torture/compile/pr23946.c (long2str): Declare. (avi_parse_comments): Call __builtin_memset instead of memset. __builtin_malloc instead of malloc. Call __builtin_memcpy instead of memcpy. Call __builtin_free instead of free. * gcc.c-torture/compile/pr31953.c (toggle_hexedit_mode): Add missing void return type. * gcc.c-torture/compile/pr32372.c (MPV_encode_init): Add missing void return type. * gcc.c-torture/compile/pr32355.c (sigemptyset): Declare. (doSignalsSetup): Add missing void return type. * gcc.c-torture/compile/pr32453.c (__assert_fail): Declare. * gcc.c-torture/compile/pr32571.c (mthca_is_memfree) (mthca_arbel_fmr_unmap, mthca_tavor_fmr_unmap) (mthca_unmap_fmr): Declare. * gcc.c-torture/compile/pr32584.c (sortpin): Add missing void types. * gcc.c-torture/compile/pr32919.c (read_int, _itoa_word) (__strnlen): Declare. * gcc.c-torture/compile/pr33173.c (test_dir_format): Add missing void return type. Add missing int types. * gcc.c-torture/compile/pr33855.c (cabsl): Declare. * gcc.c-torture/compile/pr34334.c (__strsep_1c) (__strsep_2c): Add missing void return type. * gcc.c-torture/compile/pr35006.c (grub_putchar) (cl_set_pos, cl_print, grub_memmove, cl_delete): Declare. (grub_cmdline_get): Add missing void return type. * gcc.c-torture/compile/pr35595.c (__kernel_sinf): Declare. * gcc.c-torture/compile/pr35869.c (f): Add missing void return type. * gcc.c-torture/compile/pr36172.c (FcCharSetFreeze): Add missing return value. * gcc.c-torture/compile/pr36238.c (lshift_s_s): Declare. * gcc.c-torture/compile/pr37207.c (func_81, func_98): Declare. * gcc.c-torture/compile/pr37258.c (mod_rhs, lshift_s_s) (func_112, func_23): Declare. * gcc.c-torture/compile/pr37305.c (safe_mod_u_u): Declare. * gcc.c-torture/compile/pr37327.c (func_93, func_59) (func_124, func_117, safe_add_uint64_t_u_u) (safe_mul_int32_t_s_s): Declare. * gcc.c-torture/compile/pr37387.c (FuncMakeConsequencesPres): Call __builtin_abort instead of ErrorQuit. * gcc.c-torture/compile/pr37432.c (print_wkb_bytes): Declare. * gcc.c-torture/compile/pr37713.c (sdp_seq_alloc): Declare. * gcc.c-torture/compile/pr39886.c (func): Declare. * gcc.c-torture/compile/pr39941.c (stop): Declare. * gcc.c-torture/compile/pr41016.c (CompareRNAStructures): Call __builtin_abort instead of Die. * gcc.c-torture/compile/pr42632.c (___pskb_trim): Add forward declaration. * gcc.c-torture/compile/pr49710.c (baz): Add forward declaration and missing void types. (bar): Add missing void type. * gcc.c-torture/compile/pr52437.c (fn2): Declare. * gcc.c-torture/compile/pr57441.c (func_1): Add missing void return type. * gcc.c-torture/compile/pr87110.c (struct d): Add missing semicolon. (g, h): Define as int. (i): Add missing void types. * gcc.c-torture/compile/pr87468.c (a): Define as int. (e, f): Declare. (b): Add missing void types. * gcc.c-torture/execute/pr79043.c (ptr2): Use cast in initializer. (typepun): Add missing void return type. (main): Add missing int return type and missing void type. * gcc.dg/pr100349.c (b): Add missing void return type. * gcc.dg/pr106189.c (T): Declare. * gcc.dg/pr110777.c (_setjmp): Declare * gcc.dg/pr45506.c (dynvec, relative_relocp, atexit): Declare. (fini_array): Cast result of relative_relocp from int to int *. * gcc.dg/pr97359.c: Compile with -Wno-pointer-to-int-cast. (b): Cast point to int to avoid int-conversion warning. * gcc.dg/uninit-pr78548.c: Call __builtin_printf instead of printf. * gcc.dg/torture/pr39829.c (f): Declare. * gcc.dg/torture/pr44977.c (int329): Cast bar from pointer to short. * gcc.dg/torture/pr53703.c (ifa_sa_len): Declare. (usagi_getifaddrs): Call __builtin_memset instead of memset and __builtin_memcmp instead of memcmp. * gcc.dg/torture/pr68625.c (z9): Explicitly cast pointers to int. * gcc.dg/torture/pr55964.c (f): Cast q to the expected type. * gcc.dg/torture/pr70623.c (h9): Fix pointer cast in assignment of av. * gcc.dg/torture/pr81118.c (c): Return zero instead of nothing. * gcc.dg/torture/pr81510.c (e): Add cast from int to pointer. * gcc.dg/torture/pr99694.c (d): Add missing casts between pointers and integers. * gcc.dg/tree-ssa/pr102563.c: Define as void (*) (void). (_bdf_parse_glyphs_p): Define with prototype. * gcc.dg/tree-ssa/pr92085-1.c (di): Add cast to initialization of fq. * gcc.dg/tree-ssa/pr92085-2.c (c1): Add casts to initializations of th, lq. * gcc.dg/tree-ssa/reassoc-43.c (c_parser_next_token_is_keyword, chainon) (c_parser_attributes): Declare. * gcc.dg/tree-ssa/split-path-4.c (powi_lookup_cost): Declare. (powi_cost): Add missing void return type. * gcc.dg/tree-ssa/split-path-6.c (strtosichar) (ichartosstr, treeinsert, stop, __srget_r): Declare (givehelp, oof, lookharder): Convert to prototypes. * gcc.target/i386/pr71621-1.c (y8): Cast to expected pointer type in assignment of t6. * gcc.target/i386/pr79571.c (g): Add missing int type. (j): Add missing void types and pointer cast. * gcc.target/i386/pr87246.c (s2): Add cast from integer to pointer type. * gcc.target/i386/pr87759.c (rc): Cast to the expected pointer time in initialization of ar. * gcc.target/i386/pr99454.c (tg3_start_xmit): Add missing cast from int to int *. --- gcc/testsuite/gcc.c-torture/compile/20080613-1.c | 2 +- gcc/testsuite/gcc.c-torture/compile/complex-6.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr23445.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr23946.c | 12 ++++++------ gcc/testsuite/gcc.c-torture/compile/pr31953.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr32355.c | 2 ++ gcc/testsuite/gcc.c-torture/compile/pr32372.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr32453.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr32571.c | 3 +++ gcc/testsuite/gcc.c-torture/compile/pr32584.c | 3 ++- gcc/testsuite/gcc.c-torture/compile/pr32919.c | 4 ++++ gcc/testsuite/gcc.c-torture/compile/pr33173.c | 9 +++++---- gcc/testsuite/gcc.c-torture/compile/pr33855.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr34334.c | 4 ++-- gcc/testsuite/gcc.c-torture/compile/pr35006.c | 6 ++++++ gcc/testsuite/gcc.c-torture/compile/pr35595.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr35869.c | 2 +- gcc/testsuite/gcc.c-torture/compile/pr36172.c | 2 +- gcc/testsuite/gcc.c-torture/compile/pr36238.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr37207.c | 3 +++ gcc/testsuite/gcc.c-torture/compile/pr37258.c | 5 +++++ gcc/testsuite/gcc.c-torture/compile/pr37305.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr37327.c | 7 +++++++ gcc/testsuite/gcc.c-torture/compile/pr37387.c | 2 +- gcc/testsuite/gcc.c-torture/compile/pr37432.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr37713.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr39886.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr39941.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr41016.c | 2 +- gcc/testsuite/gcc.c-torture/compile/pr42632.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr49710.c | 6 ++++-- gcc/testsuite/gcc.c-torture/compile/pr52437.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr57441.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr87110.c | 7 ++++--- gcc/testsuite/gcc.c-torture/compile/pr87468.c | 6 ++++-- gcc/testsuite/gcc.c-torture/execute/pr79043.c | 7 ++++--- gcc/testsuite/gcc.dg/pr100349.c | 3 ++- gcc/testsuite/gcc.dg/pr106189.c | 1 + gcc/testsuite/gcc.dg/pr110777.c | 1 + gcc/testsuite/gcc.dg/pr45506.c | 5 ++++- gcc/testsuite/gcc.dg/pr97359.c | 4 ++-- gcc/testsuite/gcc.dg/torture/pr39829.c | 2 ++ gcc/testsuite/gcc.dg/torture/pr44977.c | 2 +- gcc/testsuite/gcc.dg/torture/pr53703.c | 7 ++++--- gcc/testsuite/gcc.dg/torture/pr55964.c | 2 +- gcc/testsuite/gcc.dg/torture/pr68625.c | 4 ++-- gcc/testsuite/gcc.dg/torture/pr70623.c | 2 +- gcc/testsuite/gcc.dg/torture/pr81118.c | 4 ++-- gcc/testsuite/gcc.dg/torture/pr81510.c | 2 +- gcc/testsuite/gcc.dg/torture/pr99694.c | 4 ++-- gcc/testsuite/gcc.dg/tree-ssa/pr102563.c | 4 ++-- gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c | 4 ++-- gcc/testsuite/gcc.dg/tree-ssa/reassoc-43.c | 3 +++ gcc/testsuite/gcc.dg/tree-ssa/split-path-4.c | 3 +++ gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c | 14 +++++++++----- gcc/testsuite/gcc.dg/uninit-pr78548.c | 4 ++-- gcc/testsuite/gcc.target/i386/pr71621-1.c | 2 +- gcc/testsuite/gcc.target/i386/pr79571.c | 7 ++++--- gcc/testsuite/gcc.target/i386/pr87246.c | 2 +- gcc/testsuite/gcc.target/i386/pr87759.c | 2 +- gcc/testsuite/gcc.target/i386/pr99454.c | 2 +- 62 files changed, 138 insertions(+), 64 deletions(-) base-commit: 1b8c3578a50ec575258b39a0e99e1426ac7ef96c diff --git a/gcc/testsuite/gcc.c-torture/compile/20080613-1.c b/gcc/testsuite/gcc.c-torture/compile/20080613-1.c index 20e3878420e..fb980091293 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20080613-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20080613-1.c @@ -26,7 +26,7 @@ static sockaddr_any src_addr; inline struct cmsghdr * cmsg_put(struct cmsghdr *cm, int type, void *data, size_t len) { - memcpy(((cm)->__cmsg_data), data, len); + __builtin_memcpy(((cm)->__cmsg_data), data, len); } int hop_sendmsg(int fd) { diff --git a/gcc/testsuite/gcc.c-torture/compile/complex-6.c b/gcc/testsuite/gcc.c-torture/compile/complex-6.c index 9724bf27863..5cf938257d1 100644 --- a/gcc/testsuite/gcc.c-torture/compile/complex-6.c +++ b/gcc/testsuite/gcc.c-torture/compile/complex-6.c @@ -2,6 +2,7 @@ /* { dg-require-effective-target indirect_jumps } */ long buf[10]; +void bar (void); int foo() { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23445.c b/gcc/testsuite/gcc.c-torture/compile/pr23445.c index 3ddf9b702c7..bf635fc8da6 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr23445.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr23445.c @@ -1,6 +1,7 @@ struct buffer_head { char *b_data; }; + void __brelse(struct buffer_head *); void asfs_deletebnode( struct buffer_head *bhsec) { if (bhsec == 0) { void *bnc2 = (void *) bhsec->b_data; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23946.c b/gcc/testsuite/gcc.c-torture/compile/pr23946.c index ecaa5b1635c..b39fd3d1192 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr23946.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr23946.c @@ -1,4 +1,4 @@ - +void long2str (const char *, int); extern int foo (void); int @@ -10,10 +10,10 @@ avi_parse_comments (int fd, char *buf, int space_left) if (fd <= 0 || !buf || space_left <= 0) return -1; - memset (buf, 0, space_left); + __builtin_memset (buf, 0, space_left); readlen = foo (); - if (!(data = malloc (readlen * sizeof (char) + 1))) + if (!(data = __builtin_malloc (readlen * sizeof (char) + 1))) return -1; c = data; @@ -34,7 +34,7 @@ avi_parse_comments (int fd, char *buf, int space_left) return len; - memcpy (buf + len, c, 4); + __builtin_memcpy (buf + len, c, 4); len += 4; @@ -42,7 +42,7 @@ avi_parse_comments (int fd, char *buf, int space_left) len += 4; - memcpy (buf + len, d, k); + __builtin_memcpy (buf + len, d, k); *(buf + len + k + 1) = '\0'; @@ -64,7 +64,7 @@ avi_parse_comments (int fd, char *buf, int space_left) } } - free (data); + __builtin_free (data); return len; } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr31953.c b/gcc/testsuite/gcc.c-torture/compile/pr31953.c index 667c9ae8851..11af7e131e6 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr31953.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr31953.c @@ -2,6 +2,7 @@ struct WView { int hexedit_mode:1; }; +void toggle_hexedit_mode (struct WView *view) { if (view->hexedit_mode) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32355.c b/gcc/testsuite/gcc.c-torture/compile/pr32355.c index e88cf5cf79c..6d6e20f86c4 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr32355.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr32355.c @@ -13,6 +13,8 @@ struct sigaction __sigset_t sa_mask; int sa_flags; }; +void sigemptyset (__sigset_t *); +void doSignalsSetup (void) { static const int signals[] = { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32372.c b/gcc/testsuite/gcc.c-torture/compile/pr32372.c index cead1ca0096..798fc6ee09e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr32372.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr32372.c @@ -12,6 +12,7 @@ typedef struct ScanTable int h263_aic; } MpegEncContext; +void MPV_encode_init (AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32453.c b/gcc/testsuite/gcc.c-torture/compile/pr32453.c index bdabac76d71..289be6e8225 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr32453.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr32453.c @@ -1,3 +1,4 @@ +void __assert_fail (void); void ucs2reverse_internal_loop_single (long *irreversible, int foo) { unsigned char bytebuf[2]; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32571.c b/gcc/testsuite/gcc.c-torture/compile/pr32571.c index 9592e3f3680..071d6e972f2 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr32571.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr32571.c @@ -12,6 +12,9 @@ struct mthca_fmr *to_mfmr(struct ib_fmr *ibmr) const struct ib_fmr *__mptr = (ibmr); return (struct mthca_fmr *)( (char *)__mptr ); } +int mthca_is_memfree(void); +void mthca_arbel_fmr_unmap (struct mthca_fmr *); +void mthca_tavor_fmr_unmap (struct mthca_fmr *); void mthca_unmap_fmr(struct list_head *fmr_list) { struct ib_fmr *fmr; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32584.c b/gcc/testsuite/gcc.c-torture/compile/pr32584.c index 403ea9b12fa..98dacaae094 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr32584.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr32584.c @@ -51,7 +51,8 @@ typedef struct binbox { CHANGRDBOX ; extern int numcells ; extern int numterms ; -sortpin() +void +sortpin(void) { int j , n , cell ; CBOXPTR ptr ; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32919.c b/gcc/testsuite/gcc.c-torture/compile/pr32919.c index 204c6a6126e..940de2b84bc 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr32919.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr32919.c @@ -1,6 +1,10 @@ /* { dg-require-effective-target indirect_jumps } */ /* { dg-require-effective-target label_values } */ +void read_int (char **); +void _itoa_word (char); +void __strnlen (void); + void _IO_vfprintf_internal ( char *f ) { static const void *const step0_jumps[] = { &&do_form_unknown, &&do_flag_plus, &&do_form_float }; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr33173.c b/gcc/testsuite/gcc.c-torture/compile/pr33173.c index f599297e79a..b43ee9914cc 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr33173.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr33173.c @@ -12,6 +12,7 @@ typedef struct rend_service_descriptor_t char status_tag[32]; } tor_version_t; +void test_dir_format (void) { tor_version_t ver1; @@ -52,7 +53,7 @@ test_dir_format (void) char *) (v2); - register + register int __result = (((__const unsigned char *) (__const char *) (v1))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) @@ -76,10 +77,10 @@ test_dir_format (void) (__const char *) - (__const + (__const int *) (v1); - register + register int __result = ((__const unsigned char *) (__const char *) (v2))[0]; if (__s2_len > 0 && __result == 0) @@ -96,7 +97,7 @@ test_dir_format (void) v2))));} )) { - printf ("."); + __builtin_printf ("."); } } } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr33855.c b/gcc/testsuite/gcc.c-torture/compile/pr33855.c index e678cb34105..ce670e0fc1c 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr33855.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr33855.c @@ -7,6 +7,7 @@ typedef struct { _Complex long double *vqd; } vsorc_t; vsorc_t vsorc; +long double cabsl(_Complex long double); void foo(int next_job, int ain_num, int iped, long t) { long double zpnorm; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34334.c b/gcc/testsuite/gcc.c-torture/compile/pr34334.c index 5fa60a35604..b9337e995ed 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr34334.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr34334.c @@ -77,8 +77,8 @@ struct tm { }; typedef struct __locale_struct { } *__locale_t; extern int getaddrinfo (__const char *__restrict __name, struct addrinfo **__restrict __pai); typedef struct _IO_FILE FILE; -__strsep_1c (char **__s, char __reject) { } -__strsep_2c (char **__s, char __reject1, char __reject2) { } +void __strsep_1c (char **__s, char __reject) { } +void __strsep_2c (char **__s, char __reject1, char __reject2) { } typedef struct stack_st { } STACK; typedef struct asn1_string_st ASN1_BIT_STRING; typedef struct bn_mont_ctx_st BN_MONT_CTX; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35006.c b/gcc/testsuite/gcc.c-torture/compile/pr35006.c index fc343da9dab..02f0662a804 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr35006.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr35006.c @@ -1,6 +1,12 @@ /* { dg-require-effective-target alloca } */ typedef unsigned long grub_uint64_t; typedef grub_uint64_t grub_size_t; +void grub_putchar (char); +void cl_set_pos (void); +void cl_print (grub_size_t, char); +void grub_memmove (void); +void cl_delete (grub_size_t); +void grub_cmdline_get (unsigned max_len, int echo_char) { unsigned xpos, ypos, ystart; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35595.c b/gcc/testsuite/gcc.c-torture/compile/pr35595.c index d88cedc5685..ab1ddced843 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr35595.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr35595.c @@ -10,6 +10,7 @@ ieee_float_shape_type; static const float two23 = 8.3886080000e+06; static const float pi = 3.1415927410e+00; static const float zero = 0.0000000000e+00; +float __kernel_sinf (float, float, int); static float sin_pif (float x) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr35869.c b/gcc/testsuite/gcc.c-torture/compile/pr35869.c index e83c0e86bed..6dbd7a6e8e5 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr35869.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr35869.c @@ -33,7 +33,7 @@ static unsigned int find_tmpreg(struct texture_stage_op op[8]) { return 0; } -extern f(const char*); +extern void f(const char*); void g() { struct texture_stage_op op[8]; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr36172.c b/gcc/testsuite/gcc.c-torture/compile/pr36172.c index aaee377f5b4..388a03f9906 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr36172.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr36172.c @@ -10,7 +10,7 @@ __SIZE_TYPE__ FcCharSetFreeze (int *fcs, int b) if (hash) a = b; if (!a) - return; + return 0; } return (__SIZE_TYPE__) fcs; } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr36238.c b/gcc/testsuite/gcc.c-torture/compile/pr36238.c index 358e1ff5e28..6e85dbd5f01 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr36238.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr36238.c @@ -7,6 +7,7 @@ uint16_t g_169 = 0x89E3L; const volatile uint32_t g_258 = 0x63AFEBCAL; int32_t func_11; int32_t func_29; +int lshift_s_s (int32_t, int32_t); int32_t func_5 (int32_t p_6, int32_t p_8, uint16_t p_10) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37207.c b/gcc/testsuite/gcc.c-torture/compile/pr37207.c index 72333d26f6c..919750d4ac4 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr37207.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr37207.c @@ -1,3 +1,6 @@ +int func_81 (int); +void func_98 (int); + void func_18 ( int t ) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37258.c b/gcc/testsuite/gcc.c-torture/compile/pr37258.c index 41801781e3a..a56e1c3c625 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr37258.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr37258.c @@ -31,6 +31,11 @@ int64_t g_380; int32_t func_99 (int16_t p_100, int32_t p_101, int32_t p_102, int32_t p_103, int64_t p_105, int32_t p_106, int32_t p_107, int16_t p_108, int16_t p_109); +int mod_rhs (int64_t); +int lshift_s_s (int, int); +int func_112 (long ing, unsigned int); +void func_23 (int32_t, int); +long int func_82 (int, int, int64_t, int, int16_t, int, int); int32_t func_77 (int64_t p_79) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37305.c b/gcc/testsuite/gcc.c-torture/compile/pr37305.c index 7c0673609df..24b4c612fd0 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr37305.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr37305.c @@ -1,5 +1,6 @@ typedef int int32_t; typedef unsigned int uint32_t; +int safe_mod_u_u (unsigned int, unsigned int); static inline int safe_add_s_s (int si1, int si2) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37327.c b/gcc/testsuite/gcc.c-torture/compile/pr37327.c index 5ca9d1d45b6..27f65e2b9f2 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr37327.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr37327.c @@ -25,6 +25,13 @@ func_17 (int32_t p_18, uint32_t p_19, uint32_t p_21) return l_23; } +int func_93 (int); +int func_59 (uint32_t, ...); +int func_124 (uint32_t, long int, int, uint32_t, int, uint32_t, int); +void func_117 (int, int, int, int); +int safe_add_uint64_t_u_u (uint32_t, unsigned long long int); +int safe_mul_int32_t_s_s (int, int); + uint32_t func_26 (uint16_t p_27) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37387.c b/gcc/testsuite/gcc.c-torture/compile/pr37387.c index d338933e6ec..526a7ac9d31 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr37387.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr37387.c @@ -6,6 +6,6 @@ void FuncMakeConsequencesPres (long *objDefs1) int b = 0; if (! ( 13 <= ( c ? 0 : (((int) objDefs1 & 0x02) ? 0 : *objDefs1 )) && b <= 0)) - ErrorQuit (); + __builtin_abort (); } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37432.c b/gcc/testsuite/gcc.c-torture/compile/pr37432.c index 747ec34c8f3..24af1574ee8 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr37432.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr37432.c @@ -1,3 +1,4 @@ +void print_wkb_bytes (unsigned char *, int, int); static void print_wkb_byte(unsigned char val) { print_wkb_bytes((unsigned char *)&val, 1, 1); } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37713.c b/gcc/testsuite/gcc.c-torture/compile/pr37713.c index 04b4394dc56..3b0ce739c6e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr37713.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr37713.c @@ -1,3 +1,4 @@ +void sdp_seq_alloc (void **); void add_opush(void) { unsigned char formats[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0xff }; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39886.c b/gcc/testsuite/gcc.c-torture/compile/pr39886.c index e85dbb3418d..a0abfc37641 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr39886.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr39886.c @@ -1,6 +1,7 @@ /* PR middle-end/39886 */ int foo (int); +void func (int); volatile unsigned char g; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39941.c b/gcc/testsuite/gcc.c-torture/compile/pr39941.c index 5cb3b0554ee..00cd9829ba6 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr39941.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr39941.c @@ -2,6 +2,7 @@ typedef void (*entry_func) (void) __attribute__ ((noreturn)); extern entry_func entry_addr; +void stop (void); static void bsd_boot_entry (void) { stop (); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41016.c b/gcc/testsuite/gcc.c-torture/compile/pr41016.c index 57bddb49dea..b9a16ff4a78 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr41016.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr41016.c @@ -13,5 +13,5 @@ CompareRNAStructures (FILE * ofp, int start, int L, char *ss_true, char *ss) } if (((int) pairs % 2 != 0) || ((int) pairs_true % 2 != 0) || ((int) agree % 2 != 0)) - Die ("Error in CompareRNAStrutures(); odd number of paired nucleotides\n"); + __builtin_abort (); } diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42632.c b/gcc/testsuite/gcc.c-torture/compile/pr42632.c index a6778537ae2..c6383c5f047 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr42632.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr42632.c @@ -1,3 +1,4 @@ +int ___pskb_trim(void); static inline __attribute__((always_inline)) int __pskb_trim(void) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49710.c b/gcc/testsuite/gcc.c-torture/compile/pr49710.c index 2a6e331db8d..4250ccca245 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr49710.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr49710.c @@ -1,4 +1,5 @@ int a, b, c, d; +void baz (void); static void foo (int *x) @@ -20,7 +21,7 @@ if (c) } static void -bar () +bar (void) { foo (0); foo (0); @@ -28,7 +29,8 @@ bar () ; } -baz () +void +baz (void) { for (; a;) bar (); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52437.c b/gcc/testsuite/gcc.c-torture/compile/pr52437.c index 1f6b1b3026b..ef55a80add5 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr52437.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr52437.c @@ -1,6 +1,7 @@ /* PR target/52437 */ int f, g, i, j; +void fn2 (void); void fn1 () diff --git a/gcc/testsuite/gcc.c-torture/compile/pr57441.c b/gcc/testsuite/gcc.c-torture/compile/pr57441.c index e357c100518..00ec0247525 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr57441.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr57441.c @@ -10,6 +10,7 @@ baz (char p1) } void func_65 (); +void func_1 () { func_65 (); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr87110.c b/gcc/testsuite/gcc.c-torture/compile/pr87110.c index c2eba54a5c7..57739ed487f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr87110.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr87110.c @@ -2,10 +2,11 @@ enum a { b, c }; struct d { _Bool e; - enum a f + enum a f; }; -g, h; -i() { +int g, h; +void +i(void) { struct d j[h]; j[0] = (struct d){.f = c}; for (; g;) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr87468.c b/gcc/testsuite/gcc.c-torture/compile/pr87468.c index 2f5cf80bf9f..521879a7f4b 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr87468.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr87468.c @@ -1,5 +1,7 @@ -a; -b() { +int a; +int e(void); +void f(void); +void b(void) { int c = 1; for (; c <= 3;) { int d = e() && !0; diff --git a/gcc/testsuite/gcc.c-torture/execute/pr79043.c b/gcc/testsuite/gcc.c-torture/execute/pr79043.c index b7fcc8260dc..09958c84c77 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr79043.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr79043.c @@ -3,16 +3,17 @@ int val; int *ptr = &val; -float *ptr2 = &val; +float *ptr2 = (float *) &val; -static +static void __attribute__((always_inline, optimize ("-fno-strict-aliasing"))) typepun () { *ptr2=0; } -main() +int +main(void) { *ptr=1; typepun (); diff --git a/gcc/testsuite/gcc.dg/pr100349.c b/gcc/testsuite/gcc.dg/pr100349.c index dd7977ac0f9..ec34950165d 100644 --- a/gcc/testsuite/gcc.dg/pr100349.c +++ b/gcc/testsuite/gcc.dg/pr100349.c @@ -1,8 +1,9 @@ // { dg-do compile } -// { dg-options "-O2 -w" } +// { dg-options "-O2" } #include uint8_t a; +void b(int8_t c) { int d; e: diff --git a/gcc/testsuite/gcc.dg/pr106189.c b/gcc/testsuite/gcc.dg/pr106189.c index 0eca8343c56..7c6e548a51f 100644 --- a/gcc/testsuite/gcc.dg/pr106189.c +++ b/gcc/testsuite/gcc.dg/pr106189.c @@ -2,4 +2,5 @@ /* { dg-options "-O2 -Warray-bounds=2 -w" } */ int a_n_0_0_a[][0]; +void T(int); void a_n_0_0() { T(((char *)a_n_0_0_a)[1]); } diff --git a/gcc/testsuite/gcc.dg/pr110777.c b/gcc/testsuite/gcc.dg/pr110777.c index 253c2a44d3d..0c10590bcda 100644 --- a/gcc/testsuite/gcc.dg/pr110777.c +++ b/gcc/testsuite/gcc.dg/pr110777.c @@ -2,6 +2,7 @@ /* { dg-options "-O3 -w" } */ void pm_message (int); +void _setjmp (void); int *findOrAddBackgroundInPalette_palette_pnm; static void findOrAddBackgroundInPalette(unsigned *paletteSizeP, int *backgroundIndexP) { diff --git a/gcc/testsuite/gcc.dg/pr45506.c b/gcc/testsuite/gcc.dg/pr45506.c index e934dc93cce..ca6f112e53c 100644 --- a/gcc/testsuite/gcc.dg/pr45506.c +++ b/gcc/testsuite/gcc.dg/pr45506.c @@ -23,12 +23,14 @@ struct objlist { static uintptr_t ldd(void *frame) __attribute__((__used__)); static list_head_t *_dl_all_objects_ptr; +int dynvec(struct object *, int); +int relative_relocp(struct object *); static void fini_array(struct object *const obj) { if ((dynvec(obj,(unsigned)26)) != ((Elf32_Word)-1)) { unsigned i; const unsigned funcs = (dynvec(obj,(unsigned)28)) / 4; const Elf32_Word fa = (dynvec(obj,(unsigned)26)); - const int *const p = relative_relocp(obj); + const int *const p = (int *) relative_relocp(obj); for (i = (funcs ? (funcs - 1) : 0U); i != 0U; i--) { void (*const func)(void) = (void *) p[i]; (*func)(); @@ -42,6 +44,7 @@ static void _do_exit_fini(void) { ((o)) = ((void *)(((list_head_t *)((o)))->next))) fini_array (o->object); } +void atexit(void (*)(void)); static uintptr_t ldd (void *frame) { atexit(_do_exit_fini); } diff --git a/gcc/testsuite/gcc.dg/pr97359.c b/gcc/testsuite/gcc.dg/pr97359.c index 142542e404c..9e3cc9d75ab 100644 --- a/gcc/testsuite/gcc.dg/pr97359.c +++ b/gcc/testsuite/gcc.dg/pr97359.c @@ -1,11 +1,11 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -w" } */ +/* { dg-options "-O2 -Wno-pointer-to-int-cast" } */ typedef unsigned int uint32_t; int a; void b(uint32_t c) { uint32_t *d = &c; for (; a;) - for (;; (*d %= a) / (*d > 1 > (c > 0)) ?: d) + for (;; (*d %= a) / (*d > 1 > (c > 0)) ?: (int) d) ; } diff --git a/gcc/testsuite/gcc.dg/torture/pr39829.c b/gcc/testsuite/gcc.dg/torture/pr39829.c index da15a56e106..f88a03caf8f 100644 --- a/gcc/testsuite/gcc.dg/torture/pr39829.c +++ b/gcc/testsuite/gcc.dg/torture/pr39829.c @@ -1,6 +1,8 @@ /* { dg-do compile } */ /* { dg-options "-w" } */ +void f (long); + void foo (void * DAG_temp117584) { char uA; diff --git a/gcc/testsuite/gcc.dg/torture/pr44977.c b/gcc/testsuite/gcc.dg/torture/pr44977.c index 66fd7d1bfae..c5ccccb911b 100644 --- a/gcc/testsuite/gcc.dg/torture/pr44977.c +++ b/gcc/testsuite/gcc.dg/torture/pr44977.c @@ -31,7 +31,7 @@ int int329 (int * const *const int32p_81, short ** p_82) { short l_85; lbl_89:g_67 ^= l_85; - for (l_85 = 0; l_85 >= 0; l_85 = bar) + for (l_85 = 0; l_85 >= 0; l_85 = (short) bar) if (g_31) goto lbl_89; func_90 (1), g_68[0][2][2][0][0].f3, 0; diff --git a/gcc/testsuite/gcc.dg/torture/pr53703.c b/gcc/testsuite/gcc.dg/torture/pr53703.c index c9e10abf594..5188c48d906 100644 --- a/gcc/testsuite/gcc.dg/torture/pr53703.c +++ b/gcc/testsuite/gcc.dg/torture/pr53703.c @@ -44,6 +44,7 @@ struct rtmaddr_ifamap { int address_len; int local_len; }; +int ifa_sa_len (int, int); int usagi_getifaddrs (struct ifaddrs **ifap) { struct nlmsg_list *nlmsg_list, *nlmsg_end, *nlm; @@ -72,7 +73,7 @@ int usagi_getifaddrs (struct ifaddrs **ifap) struct rtattr *rta; sa_family_t nlm_family = 0; uint32_t nlm_scope = 0, nlm_index = 0; - memset (&ifamap, 0, sizeof (ifamap)); + __builtin_memset (&ifamap, 0, sizeof (ifamap)); switch (nlh->nlmsg_type) { case RTM_NEWLINK: @@ -134,8 +135,8 @@ int usagi_getifaddrs (struct ifaddrs **ifap) } if (ifamap.address_len != ifamap.local_len || (ifamap.address != ((void *)0) - && memcmp (ifamap.address, ifamap.local, - ifamap.address_len))) + && __builtin_memcmp (ifamap.address, ifamap.local, + ifamap.address_len))) { if (!build) dlen += (((ifa_sa_len (nlm_family, diff --git a/gcc/testsuite/gcc.dg/torture/pr55964.c b/gcc/testsuite/gcc.dg/torture/pr55964.c index 361151ccf0c..7bbcc95f6c1 100644 --- a/gcc/testsuite/gcc.dg/torture/pr55964.c +++ b/gcc/testsuite/gcc.dg/torture/pr55964.c @@ -12,7 +12,7 @@ lbl1: if((b %= 0) * (b ? 0 : a) - 1 && (u /= 0)) { - int *q = &u, **k = q; + int *q = &u, **k = (int **) q; goto lbl1; lbl2: lbl3: diff --git a/gcc/testsuite/gcc.dg/torture/pr68625.c b/gcc/testsuite/gcc.dg/torture/pr68625.c index 47f837a2418..ab4b06e9160 100644 --- a/gcc/testsuite/gcc.dg/torture/pr68625.c +++ b/gcc/testsuite/gcc.dg/torture/pr68625.c @@ -7,7 +7,7 @@ int sg; void z9(void) { - int pz, oi, vz, yp, zi, hd, pw, gr, w9 = 0, j0 = -1, rb = &w9; + int pz, oi, vz, yp, zi, hd, pw, gr, w9 = 0, j0 = -1, rb = (int) &w9; int *lr; while (w9 < 1) { lr++; @@ -24,7 +24,7 @@ ee: **dp = 1; while (**dp) if (++oi) { - int mq = dp; + int mq = (int) dp; j0 = 1; while (pw < 1) { if (++rb && mq) diff --git a/gcc/testsuite/gcc.dg/torture/pr70623.c b/gcc/testsuite/gcc.dg/torture/pr70623.c index 37f2712d87d..a4974f6ff68 100644 --- a/gcc/testsuite/gcc.dg/torture/pr70623.c +++ b/gcc/testsuite/gcc.dg/torture/pr70623.c @@ -25,7 +25,7 @@ u4: } } while (wk < 3) { - av = **ptr_10; + av = (int *) **ptr_10; ++wk; } } diff --git a/gcc/testsuite/gcc.dg/torture/pr81118.c b/gcc/testsuite/gcc.dg/torture/pr81118.c index 42d83fd0b07..7e39dbe3e8d 100644 --- a/gcc/testsuite/gcc.dg/torture/pr81118.c +++ b/gcc/testsuite/gcc.dg/torture/pr81118.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-w" } */ +/* { dg-additional-options "-fpermissive -w" } */ int a[7], b; int c() @@ -8,7 +8,7 @@ int c() for (; d; d++) if (a[d]) if (b) - return; + return 0; else if (d >= e) return 0; } diff --git a/gcc/testsuite/gcc.dg/torture/pr81510.c b/gcc/testsuite/gcc.dg/torture/pr81510.c index c93c4683629..7faf931de11 100644 --- a/gcc/testsuite/gcc.dg/torture/pr81510.c +++ b/gcc/testsuite/gcc.dg/torture/pr81510.c @@ -14,7 +14,7 @@ int e() for (;;) if (g) for (; b; b++) { - g = c; + g = (f *) c; if (a &= c) { d *j = &b; h k; diff --git a/gcc/testsuite/gcc.dg/torture/pr99694.c b/gcc/testsuite/gcc.dg/torture/pr99694.c index df316961673..15b603d559a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr99694.c +++ b/gcc/testsuite/gcc.dg/torture/pr99694.c @@ -18,10 +18,10 @@ void d() { j: **l = 0; } - *i = c; + *i = (int32_t *) c; } } - uint16_t i = &e; + uint16_t i = (uint16_t) &e; b = i / 0; goto j; } diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr102563.c b/gcc/testsuite/gcc.dg/tree-ssa/pr102563.c index 8871dffe24a..abf07d16218 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr102563.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr102563.c @@ -1,10 +1,10 @@ // { dg-do compile } // { dg-options "-O2 -w" } -int _bdf_parse_glyphs_bp; +void (*_bdf_parse_glyphs_bp) (void); long _bdf_parse_glyphs_nibbles; -void _bdf_parse_glyphs_p() +void _bdf_parse_glyphs_p(void) { long p_2; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c index c18f820a09e..8a3b6ddf657 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c @@ -7,7 +7,7 @@ di (int y9, int qw) if ((int) &y9 != 0) { int py; - int **fq = &py; + int **fq = (int **) &py; while (qw < 1) { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c index f62585c2f0f..89eec277271 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c @@ -7,7 +7,7 @@ void c1 (int oz, int dk, int ub) { int *hd = 0; - long int *th = &dk; + long int *th = (long int *) &dk; while (ub < 1) { @@ -17,7 +17,7 @@ c1 (int oz, int dk, int ub) while (oz < 2) { - long int *lq = &oz; + long int *lq = (long int *) &oz; (*hd < (*lq = *th)) < oz; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-43.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-43.c index 90e1e86b3cb..1194e2cdbc7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-43.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-43.c @@ -15,6 +15,9 @@ typedef struct c_parser short tokens_avail; } c_parser; +int c_parser_next_token_is_keyword (c_parser *, enum rid); +tree chainon (int, tree); +int c_parser_attributes (c_parser *); __inline__ c_token * c_parser_peek_token (c_parser * parser) { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/split-path-4.c b/gcc/testsuite/gcc.dg/tree-ssa/split-path-4.c index 8ef7646282c..cbee6fce4b7 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/split-path-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/split-path-4.c @@ -3,6 +3,9 @@ /* Note: Threader causes the infinite loop in val & 1 sooner. */ +unsigned long powi_lookup_cost (unsigned long, unsigned char *); + +void powi_cost (long n) { unsigned char cache[256]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c b/gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c index 71d0fc0e83b..5f5dd157601 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c @@ -15,9 +15,13 @@ extern struct _reent *_impure_ptr; extern char contextbufs[10][1024]; extern int contextoffset; extern int sflag; +int strtosichar (char *, int); +int ichartosstr (int, int); +void treeinsert (int, int, int); +void stop(void); +int __srget_r (struct _reent *, __FILE *); void -givehelp (interactive) - int interactive; +givehelp (int interactive) { if (interactive) { @@ -29,7 +33,8 @@ givehelp (interactive) } } -oof () +void +oof (void) { int bufsize; int hadnl; @@ -53,8 +58,7 @@ oof () } void -lookharder (string) - char *string; +lookharder (char *string) { register char *g; register char *s; diff --git a/gcc/testsuite/gcc.dg/uninit-pr78548.c b/gcc/testsuite/gcc.dg/uninit-pr78548.c index 12e06dd175c..2cfe7479d75 100644 --- a/gcc/testsuite/gcc.dg/uninit-pr78548.c +++ b/gcc/testsuite/gcc.dg/uninit-pr78548.c @@ -10,9 +10,9 @@ int main ( ) { L0: if ( e ) goto L1; b = c & d || a; - if ( !c ) printf ( "", ( long long ) main_f ); + if ( !c ) __builtin_printf ( "", ( long long ) main_f ); if ( d || !c ) { - printf ( "%llu\n", ( long long ) main ); + __builtin_printf ( "%llu\n", ( long long ) main ); goto L2; } unsigned g = b; diff --git a/gcc/testsuite/gcc.target/i386/pr71621-1.c b/gcc/testsuite/gcc.target/i386/pr71621-1.c index 43df5a8f0ae..66ba0fb84a6 100644 --- a/gcc/testsuite/gcc.target/i386/pr71621-1.c +++ b/gcc/testsuite/gcc.target/i386/pr71621-1.c @@ -20,7 +20,7 @@ y8 (void) gv |= sy ? 0 : v4; if (gv != 0) ++gv; - t6 = &cn; + t6 = (int **) &cn; if (gv != 0) *t6 = 0; } diff --git a/gcc/testsuite/gcc.target/i386/pr79571.c b/gcc/testsuite/gcc.target/i386/pr79571.c index 4595a1a0d82..d13aac33d45 100644 --- a/gcc/testsuite/gcc.target/i386/pr79571.c +++ b/gcc/testsuite/gcc.target/i386/pr79571.c @@ -15,11 +15,12 @@ struct fd { struct d *d } i; -g; -j () +int g; +void +j (void) { unsigned a = g; - i = (struct fd){a & 3}; + i = (struct fd){(struct d *) (a & 3)}; struct fd f = i; h = f.d->e; } diff --git a/gcc/testsuite/gcc.target/i386/pr87246.c b/gcc/testsuite/gcc.target/i386/pr87246.c index 82322e42782..6be1ce6a19f 100644 --- a/gcc/testsuite/gcc.target/i386/pr87246.c +++ b/gcc/testsuite/gcc.target/i386/pr87246.c @@ -18,5 +18,5 @@ s2 (__int128 *qv) void lt (unsigned int vb) { - s2 (vb + 1); + s2 ((__int128 *) (vb + 1)); } diff --git a/gcc/testsuite/gcc.target/i386/pr87759.c b/gcc/testsuite/gcc.target/i386/pr87759.c index fdb5d8831f3..c2b80cd0c71 100644 --- a/gcc/testsuite/gcc.target/i386/pr87759.c +++ b/gcc/testsuite/gcc.target/i386/pr87759.c @@ -17,7 +17,7 @@ rc (__int128 *oi) for (;;) { - unsigned __int128 *ar = &cc; + unsigned __int128 *ar = (unsigned __int128 *) &cc; int y5; if (oi != 0) diff --git a/gcc/testsuite/gcc.target/i386/pr99454.c b/gcc/testsuite/gcc.target/i386/pr99454.c index a59ba7dcbe0..ba3ffe2cab3 100644 --- a/gcc/testsuite/gcc.target/i386/pr99454.c +++ b/gcc/testsuite/gcc.target/i386/pr99454.c @@ -22,7 +22,7 @@ int tg3_tso_bug_gso_check(); int tg3_start_xmit() { - int *tp = netdev_priv(); + int *tp = (int *) netdev_priv(); int mss, tnapi; struct iphdr *iph; tnapi = mss = ((struct skb_shared_info *)0)->gso_size;