From patchwork Thu Dec 8 15:00:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 87279 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp886259qgi; Thu, 8 Dec 2016 07:00:52 -0800 (PST) X-Received: by 10.98.55.131 with SMTP id e125mr4194516pfa.58.1481209252858; Thu, 08 Dec 2016 07:00:52 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id n62si29153297pfk.105.2016.12.08.07.00.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 07:00:52 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-443788-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-443788-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-443788-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=ZUsD3RdZos2Pbgn/x CxRpd66RICRaXelcyLLP+ZXH6guTatrPzlyUYw42x1gfsEMKZKs9EQNhDW2fKqBo vVaWe1XmV/tJ6r6hQckkW4N6JpSGmD0XMC+DXVvle/74vf7QSbF0F5c3lHXfDgwe Opcjr0Hy8cbo/9gRE27vUki+Zs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=z9bct9zFuYmG/05cHC0I/BE T+lQ=; b=DWPdb5dSHQ4RieWg2T551dPwAnl1y1+v706CRTsyZXJ6KCPvsiWR7q6 yoQG+bIR/qkXr9PFldsXY4T7pYmeGAlIna5lPR4InXuyufLQMgJo3BidKrSlFjs9 /J9AYANNJ5UOmfPU2jfso1qrv9+jCvLcshzdj2HWxhLdIDV9Shu4= Received: (qmail 118326 invoked by alias); 8 Dec 2016 15:00:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 118239 invoked by uid 89); 8 Dec 2016 15:00:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=xfe, xcc, x6c, x26 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Dec 2016 15:00:19 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AB13FAD42 for ; Thu, 8 Dec 2016 15:00:15 +0000 (UTC) Subject: Re: [PATCH] Escape non-printable chars in dumped strings. To: GCC Patches References: <5e9b02e8-9bf7-5429-fda7-2b6efbcbef0a@suse.cz> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <4ed13d09-6c19-284f-6d75-86b284ace5d1@suse.cz> Date: Thu, 8 Dec 2016 16:00:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <5e9b02e8-9bf7-5429-fda7-2b6efbcbef0a@suse.cz> X-IsSubscribed: yes There's a patch that adds a new test-case for that. Martin >From e8805309edca43153721ce3c79252a4f4a3b2073 Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 8 Dec 2016 15:59:28 +0100 Subject: [PATCH] New test gcc/testsuite/ChangeLog: 2016-12-08 Martin Liska * gcc.dg/tree-ssa/dump-3.c: New test. --- gcc/testsuite/gcc.dg/tree-ssa/dump-3.c | 271 +++++++++++++++++++++++++++++++++ 1 file changed, 271 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/dump-3.c diff --git a/gcc/testsuite/gcc.dg/tree-ssa/dump-3.c b/gcc/testsuite/gcc.dg/tree-ssa/dump-3.c new file mode 100644 index 0000000..8533124 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/dump-3.c @@ -0,0 +1,271 @@ +/* { dg-do compile } */ +/* { dg-options "-O0 -fdump-tree-optimized" } */ + +int main() +{ + char string_0[] = "\x0"; + char string_1[] = "\x1"; + char string_2[] = "\x2"; + char string_3[] = "\x3"; + char string_4[] = "\x4"; + char string_5[] = "\x5"; + char string_6[] = "\x6"; + char string_7[] = "\x7"; + char string_8[] = "\x8"; + char string_9[] = "\x9"; + char string_10[] = "\xa"; + char string_11[] = "\xb"; + char string_12[] = "\xc"; + char string_13[] = "\xd"; + char string_14[] = "\xe"; + char string_15[] = "\xf"; + char string_16[] = "\x10"; + char string_17[] = "\x11"; + char string_18[] = "\x12"; + char string_19[] = "\x13"; + char string_20[] = "\x14"; + char string_21[] = "\x15"; + char string_22[] = "\x16"; + char string_23[] = "\x17"; + char string_24[] = "\x18"; + char string_25[] = "\x19"; + char string_26[] = "\x1a"; + char string_27[] = "\x1b"; + char string_28[] = "\x1c"; + char string_29[] = "\x1d"; + char string_30[] = "\x1e"; + char string_31[] = "\x1f"; + char string_32[] = "\x20"; + char string_33[] = "\x21"; + char string_34[] = "\x22"; + char string_35[] = "\x23"; + char string_36[] = "\x24"; + char string_37[] = "\x25"; + char string_38[] = "\x26"; + char string_39[] = "\x27"; + char string_40[] = "\x28"; + char string_41[] = "\x29"; + char string_42[] = "\x2a"; + char string_43[] = "\x2b"; + char string_44[] = "\x2c"; + char string_45[] = "\x2d"; + char string_46[] = "\x2e"; + char string_47[] = "\x2f"; + char string_48[] = "\x30"; + char string_49[] = "\x31"; + char string_50[] = "\x32"; + char string_51[] = "\x33"; + char string_52[] = "\x34"; + char string_53[] = "\x35"; + char string_54[] = "\x36"; + char string_55[] = "\x37"; + char string_56[] = "\x38"; + char string_57[] = "\x39"; + char string_58[] = "\x3a"; + char string_59[] = "\x3b"; + char string_60[] = "\x3c"; + char string_61[] = "\x3d"; + char string_62[] = "\x3e"; + char string_63[] = "\x3f"; + char string_64[] = "\x40"; + char string_65[] = "\x41"; + char string_66[] = "\x42"; + char string_67[] = "\x43"; + char string_68[] = "\x44"; + char string_69[] = "\x45"; + char string_70[] = "\x46"; + char string_71[] = "\x47"; + char string_72[] = "\x48"; + char string_73[] = "\x49"; + char string_74[] = "\x4a"; + char string_75[] = "\x4b"; + char string_76[] = "\x4c"; + char string_77[] = "\x4d"; + char string_78[] = "\x4e"; + char string_79[] = "\x4f"; + char string_80[] = "\x50"; + char string_81[] = "\x51"; + char string_82[] = "\x52"; + char string_83[] = "\x53"; + char string_84[] = "\x54"; + char string_85[] = "\x55"; + char string_86[] = "\x56"; + char string_87[] = "\x57"; + char string_88[] = "\x58"; + char string_89[] = "\x59"; + char string_90[] = "\x5a"; + char string_91[] = "\x5b"; + char string_92[] = "\x5c"; + char string_93[] = "\x5d"; + char string_94[] = "\x5e"; + char string_95[] = "\x5f"; + char string_96[] = "\x60"; + char string_97[] = "\x61"; + char string_98[] = "\x62"; + char string_99[] = "\x63"; + char string_100[] = "\x64"; + char string_101[] = "\x65"; + char string_102[] = "\x66"; + char string_103[] = "\x67"; + char string_104[] = "\x68"; + char string_105[] = "\x69"; + char string_106[] = "\x6a"; + char string_107[] = "\x6b"; + char string_108[] = "\x6c"; + char string_109[] = "\x6d"; + char string_110[] = "\x6e"; + char string_111[] = "\x6f"; + char string_112[] = "\x70"; + char string_113[] = "\x71"; + char string_114[] = "\x72"; + char string_115[] = "\x73"; + char string_116[] = "\x74"; + char string_117[] = "\x75"; + char string_118[] = "\x76"; + char string_119[] = "\x77"; + char string_120[] = "\x78"; + char string_121[] = "\x79"; + char string_122[] = "\x7a"; + char string_123[] = "\x7b"; + char string_124[] = "\x7c"; + char string_125[] = "\x7d"; + char string_126[] = "\x7e"; + char string_127[] = "\x7f"; + char string_128[] = "\x80"; + char string_129[] = "\x81"; + char string_130[] = "\x82"; + char string_131[] = "\x83"; + char string_132[] = "\x84"; + char string_133[] = "\x85"; + char string_134[] = "\x86"; + char string_135[] = "\x87"; + char string_136[] = "\x88"; + char string_137[] = "\x89"; + char string_138[] = "\x8a"; + char string_139[] = "\x8b"; + char string_140[] = "\x8c"; + char string_141[] = "\x8d"; + char string_142[] = "\x8e"; + char string_143[] = "\x8f"; + char string_144[] = "\x90"; + char string_145[] = "\x91"; + char string_146[] = "\x92"; + char string_147[] = "\x93"; + char string_148[] = "\x94"; + char string_149[] = "\x95"; + char string_150[] = "\x96"; + char string_151[] = "\x97"; + char string_152[] = "\x98"; + char string_153[] = "\x99"; + char string_154[] = "\x9a"; + char string_155[] = "\x9b"; + char string_156[] = "\x9c"; + char string_157[] = "\x9d"; + char string_158[] = "\x9e"; + char string_159[] = "\x9f"; + char string_160[] = "\xa0"; + char string_161[] = "\xa1"; + char string_162[] = "\xa2"; + char string_163[] = "\xa3"; + char string_164[] = "\xa4"; + char string_165[] = "\xa5"; + char string_166[] = "\xa6"; + char string_167[] = "\xa7"; + char string_168[] = "\xa8"; + char string_169[] = "\xa9"; + char string_170[] = "\xaa"; + char string_171[] = "\xab"; + char string_172[] = "\xac"; + char string_173[] = "\xad"; + char string_174[] = "\xae"; + char string_175[] = "\xaf"; + char string_176[] = "\xb0"; + char string_177[] = "\xb1"; + char string_178[] = "\xb2"; + char string_179[] = "\xb3"; + char string_180[] = "\xb4"; + char string_181[] = "\xb5"; + char string_182[] = "\xb6"; + char string_183[] = "\xb7"; + char string_184[] = "\xb8"; + char string_185[] = "\xb9"; + char string_186[] = "\xba"; + char string_187[] = "\xbb"; + char string_188[] = "\xbc"; + char string_189[] = "\xbd"; + char string_190[] = "\xbe"; + char string_191[] = "\xbf"; + char string_192[] = "\xc0"; + char string_193[] = "\xc1"; + char string_194[] = "\xc2"; + char string_195[] = "\xc3"; + char string_196[] = "\xc4"; + char string_197[] = "\xc5"; + char string_198[] = "\xc6"; + char string_199[] = "\xc7"; + char string_200[] = "\xc8"; + char string_201[] = "\xc9"; + char string_202[] = "\xca"; + char string_203[] = "\xcb"; + char string_204[] = "\xcc"; + char string_205[] = "\xcd"; + char string_206[] = "\xce"; + char string_207[] = "\xcf"; + char string_208[] = "\xd0"; + char string_209[] = "\xd1"; + char string_210[] = "\xd2"; + char string_211[] = "\xd3"; + char string_212[] = "\xd4"; + char string_213[] = "\xd5"; + char string_214[] = "\xd6"; + char string_215[] = "\xd7"; + char string_216[] = "\xd8"; + char string_217[] = "\xd9"; + char string_218[] = "\xda"; + char string_219[] = "\xdb"; + char string_220[] = "\xdc"; + char string_221[] = "\xdd"; + char string_222[] = "\xde"; + char string_223[] = "\xdf"; + char string_224[] = "\xe0"; + char string_225[] = "\xe1"; + char string_226[] = "\xe2"; + char string_227[] = "\xe3"; + char string_228[] = "\xe4"; + char string_229[] = "\xe5"; + char string_230[] = "\xe6"; + char string_231[] = "\xe7"; + char string_232[] = "\xe8"; + char string_233[] = "\xe9"; + char string_234[] = "\xea"; + char string_235[] = "\xeb"; + char string_236[] = "\xec"; + char string_237[] = "\xed"; + char string_238[] = "\xee"; + char string_239[] = "\xef"; + char string_240[] = "\xf0"; + char string_241[] = "\xf1"; + char string_242[] = "\xf2"; + char string_243[] = "\xf3"; + char string_244[] = "\xf4"; + char string_245[] = "\xf5"; + char string_246[] = "\xf6"; + char string_247[] = "\xf7"; + char string_248[] = "\xf8"; + char string_249[] = "\xf9"; + char string_250[] = "\xfa"; + char string_251[] = "\xfb"; + char string_252[] = "\xfc"; + char string_253[] = "\xfd"; + char string_254[] = "\xfe"; + char string_255[] = "\xff"; + + return 0; +} + +/* { dg-final { scan-tree-dump "string_0 = \"\";" "optimized" } } */ +/* { dg-final { scan-tree-dump "string_4 = \"\\\\4\";" "optimized" } } */ +/* { dg-final { scan-tree-dump "string_28 = \"\\\\x1c\";" "optimized" } } */ +/* { dg-final { scan-tree-dump "string_51 = \"3\";" "optimized" } } */ +/* { dg-final { scan-tree-dump "string_255 = \"\\\\xff\";" "optimized" } } */ + -- 2.10.2