Re: what is the difference with and without crc extension support

2022-03-04 Thread Martin Liška

On 3/3/22 14:52, Dongjiu Geng wrote:

Thanks for the answer, my source file is complex,it is not convenient
attach,  because it is company code.


I see. So then you can try -fdump-tree-optimized and compare the corresponding 
dump file.
Or you can use -fdump-tree-all -fdump-rtl-all and do the same.


According to your  experience,
what is the reason about it?


Dunno.

Cheers,
Martin



Martin Liška  于2022年3月3日周四 21:48写道:


On 3/3/22 14:41, Dongjiu Geng via Gcc wrote:

Hi,
   My program does not use CRC instructions,but I find the compiled
binary has much difference between using "-march=armv8-a+crc" and
using "-march=armv8-a". Even stranger, when I use
"-march=armv8-a+crc", I find my compiled binary can not run. but when
I change -O2 to -O0 based on "-march=armv8-a+crc",  it can run. I  do
not  know what is the reason.. can you answer it? Thanks.


Hello.

Please report bug here:
https://gcc.gnu.org/bugzilla/

and attach a pre-processed source file:
https://gcc.gnu.org/bugs/

Martin




Save/Store information, which variable are not initialized

2022-03-04 Thread Sławomir Lach
I known, IDE will detect cases, whereas variable is not initialized, but some 
developers still have problems with variable initialization.

I suppose gcc do not support any run-time sanitizer, because I do not found 
any information.

So: gcc will introduce hidden array of variables for each context. One bit 
stores information about one variable in current scope. So, if it is set - 
variable was initialized. In other case, variable is not initialized. When new 
scope is created, gcc will allocate this array and set each element to 0. When 
program set variable, also bit is set.

Each structure will contains this array at top of self. GCC must hack access 
to this struct in some way. That is big problem to handle this case, because 
some languages allow to free memory access. Maybe for struct store information 
about fields state in different part of memory?

Idea was inspired by way to detect cases, where return address was written.
Programmer should compile program with special switch to enable this mode.

GDB could support this feature of gcc and read, which variable was not set.




Re: what is the difference with and without crc extension support

2022-03-04 Thread Richard Earnshaw via Gcc

On 03/03/2022 13:41, Dongjiu Geng via Gcc wrote:

Hi,
  My program does not use CRC instructions,but I find the compiled
binary has much difference between using "-march=armv8-a+crc" and
using "-march=armv8-a". Even stranger, when I use
"-march=armv8-a+crc", I find my compiled binary can not run. but when
I change -O2 to -O0 based on "-march=armv8-a+crc",  it can run. I  do
not  know what is the reason.. can you answer it? Thanks.


The most common reason for a program failing to run when the optimizer 
is turned on is that it contains undefined behaviour.  Make sure that 
you turn on GCC's warning options and fix anything that these report.


It's very unlikely that the change of -march=armv8-a to 
-march=armv8-a+crc is the reason for the differences in compiled code 
that you are seeing.  Something else to try here is to identify an 
object file that is different between the two options and then rebuild 
it both ways, but add "-g".  You can then use


  readelf -debug-dump=str 

to print out the real options used by the compiler (there may be some 
additional strings reported in the dump, but the options are the bit 
that is interesting).  The only difference should be the -march option 
you mentioned above.


R.


gcc-10-20220304 is now available

2022-03-04 Thread GCC Administrator via Gcc
Snapshot gcc-10-20220304 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/10-20220304/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 10 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch 
releases/gcc-10 revision 69dadb7dc3507a1e6dd59a3a905901dd1653db85

You'll find:

 gcc-10-20220304.tar.xz   Complete GCC

  SHA256=04baba86b4538c0fc758351b4df8e22b4267be85df737da651db94848e35450b
  SHA1=2fc5088d05b28d1303e76a11c5433facbd646f5e

Diffs from 10-20220225 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-10
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


Re: Reqister to become gcc mirror site

2022-03-04 Thread Gerald Pfeifer
Hi Ceasar,

On Tue, 22 Feb 2022, Ceasar Sun wrote:
> We sent the follow message two weeks ago, buy didn't get response yet.
> So, send this again  and sorry for the inconvenience ~

I am sorry this didn't see an answer earlier.  It looks like you are
actively mirroring our download site already?

> I'm Ceasar Sun ,  from Free Software Lab, NCHC ,  Taiwan.
> We provide several free software mirror service in Taiwan : free.nchc.org.tw
> We would like to become a gcc mirror site and the service would be presented
> as :
> 
> Country :  Taiwan ,TW
> City: Hsinchu
> Site: https://free.nchc.org.tw/gcc/
> Contact e-mail : fs...@nchc.org.tw
> Contact Name : FSLab Team , NCHC
> 
> So, which upstream gcc site we should use ?

It's best if you use gcc.gnu.org directly. Is this what you are now
doing?  Is there anything you need?  (I believe it's probably best to
mirror using rsync.)

As a next step we then just need to add you to our mirros page at
https://gcc.gnu.org/mirrors.html, something like the following:

diff --git a/htdocs/mirrors.html b/htdocs/mirrors.html
index 75c71b95..8e35bc08 100644
--- a/htdocs/mirrors.html
+++ b/htdocs/mirrors.html
@@ -38,6 +38,7 @@ mirrors.  The following sites mirror the gcc.gnu.org 
download site
 The Netherlands, Nijmegen: https://ftp.nluug.nl/languages/gcc/";>ftp.nluug.nl, thanks to Jan 
Cristiaan van Winkel (j...@atcomputing.nl)
 Russia, Novosibirsk: http://mirror.linux-ia64.org/gnu/gcc/";>http://mirror.linux-ia64.org/gnu/gcc/,
 thanks to Daniel Volchixin (dan...@volchixin.co.uk)
 Slovakia, Bratislava: http://gcc.fyxm.net/";>gcc.fyxm.net, 
thanks to Jan Teluch (ad...@2600.sk)
+Taiwan, Hsinchu: https://free.nchc.org.tw/gcc/";>nchc.org.tw, 
thanks to FSLab Team, NCHC (fs...@nchc.org.tw)
 UK: https://mirrorservice.org/sites/sourceware.org/pub/gcc/";>mirrorservice.org,
 thanks to mir...@mirrorservice.org
 US, San Francisco: https://bigsearcher.com/mirrors/gcc/";>https://bigsearcher.com/mirrors/gcc/,
 thanks to i...@bigsearcher.com
 US, San Jose: http://www.netgull.com/gcc/";>http://www.netgull.com, thanks to 
ad...@netgull.com

What do you think? Are there any changes to this proposed patch you
suggest?

Thank you,
Gerald