This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Transactional memory test case reduction failure


I’m going to let you take it from here.  I added notes in the bottom of previous message showing you how I would do it.

From: Shubham Narlawar [mailto:gsocshubham@gmail.com]
Sent: Monday, August 27, 2018 11:35 AM
To: Blower, Melanie <melanie.blower@intel.com>
Cc: sameeran joshi <gsocsameeran@gmail.com>; gcc@gcc.gnu.org
Subject: Re: Transactional memory test case reduction failure

Here is the file. I am getting some error in sending .sh file, so I send it as below.


#!/bin/bash

gcc -fgnu-tm testcase.c > out.txt 2>&1 &&\

if

grep 'internal compiler error' out.txt

then

       exit 0

else

       exit 1

fi

#! gcc -c -fgnu-tm testcase.c

On Mon, Aug 27, 2018 at 8:59 PM Blower, Melanie <melanie.blower@intel.com<mailto:melanie.blower@intel.com>> wrote:
The –Wall option probably doesn’t make a difference, warning can be issued and the return code is still 0.

I use creduce a lot.  Usually I have a “reference” compilation as well as the failure compilation.  In your case, possibly, the reference compilation would be to NOT use the –fsquiggle option (where squiggle enables the transactional memory).  You need to work on your script until it returns 0. At that point you can start up creduce.  Does your test have a main program? I think you probably want the “-c” option

I’m not that fluent with bash scripting—I think your “if” statement might be wrong. Here’s a script that works for me in a different case,

#!/bin/bash
#
#
timeout 30s g++  -w  -c test.c >/dev/null 2>&1 &&\
timeout 30s g++  -w –fsquiggle -c test.c 2>&1 | \
head -1 | grep "internal compiler error" >/dev/null 2>&1


notice the backslash turns it all into a single line. It requires g++ to compile successfully on the first line – I use timeout because sometimes the compiler goes into an infinite loop – the 2nd line requires the compiler to issue an internal error as the first line of output. Grep returns 0 if the pattern is found



From: sameeran joshi [mailto:gsocsameeran@gmail.com<mailto:gsocsameeran@gmail.com>]
Sent: Monday, August 27, 2018 11:13 AM
To: Blower, Melanie <melanie.blower@intel.com<mailto:melanie.blower@intel.com>>
Cc: gcc@gcc.gnu.org<mailto:gcc@gcc.gnu.org>; Shubham Narlawar <gsocshubham@gmail.com<mailto:gsocshubham@gmail.com>>
Subject: Re: Transactional memory test case reduction failure

Hi,thanks for helping.
Below is  the text file contain the shell script .
I tried removing the compiler flags like -Wall,still it's giving output as 1.
Please review.
Thanks,
Sameeran joshi

On 27-Aug-2018 7:41 PM, "Blower, Melanie" <melanie.blower@intel.com<mailto:melanie.blower@intel.com>> wrote:
There's probably something wrong with your "check.sh" causing it to not return 0.  You need to debug the script.

> -----Original Message-----
> From: sameeran joshi [mailto:gsocsameeran@gmail.com<mailto:gsocsameeran@gmail.com>]
> Sent: Sunday, August 26, 2018 2:38 PM
> To: gcc@gcc.gnu.org<mailto:gcc@gcc.gnu.org>
> Cc: Shubham Narlawar <gsocshubham@gmail.com<mailto:gsocshubham@gmail.com>>
> Subject: Transactional memory test case reduction failure
>
> Hi,
> I have found an ICE in the transaction memory extension while compiling a
> program with gcc,but unfortunately for filing a bug in the gcc bugzilla I am
> unable to reduce the buggy file with creduce .
>
> I have included the command line option -fgnu-tm while compiling it.
> Does creduce support transactional memory for reduction?
>
> In the interestingness test script,it
> always returns 1, also following message is displayed
>
> C-Reduce cannot run because the interestingness test does not return zero.
> Please ensure that it does so not only in the directory where you are invoking C-
> Reduce, but also in an arbitrary temporary directory containing only the files
> that are being reduced. In other words, running these commands:
>
>   DIR=`mktemp -d`
>   cp /home/swamimauli/upload/csmith/runtime/del/testcase.c $DIR
>   cd $DIR
>   /home/swamimauli/upload/csmith/runtime/del/check.sh
>   echo $?
>
> should result in "0" being echoed to the terminal.
>
> See "creduce --help" for more information.
>
> Thanks,
> Sameeran Joshi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]