Re: Working with SVK: how to get it actually work?
Daniel Jacobowitz <[EMAIL PROTECTED]> writes: | On Sun, Nov 20, 2005 at 05:02:11AM +0100, Gabriel Dos Reis wrote: | > svk depotmap --list shows: | > | >Depot Path | > | >// /home/gdr/.svk/local | >/gcc/ /home/gdr/svk | | If you've got this... the wiki says: Next use svk depotmap to tell your installed SVK where to find the depot. Point to the top level directory as unpacked, e.g. /path/to/svk. The depot path should contain the db subdirectory, et cetera. In my case, the toplevel directory is /home/gdr/svk. | | > but the command | > | >svk checkout //gcc/trunk gcc | | ... then you can't use this. Try /gcc/gcc/trunk? Much better. Thanks! The wiki instruction would need update to reflect what the real path should be, based on *how* SVK is told where the depot is. -- Gaby
Re: Somebody broke bootstrap on trunk for x86_64
It looks kike that patch contains a typo The entry for nonmemory_operand has an extra bogus false The following patch more than likely fixes the fallout I've just kicked of a x86_64 bootstrap to find out Index: gensupport.c === --- gensupport.c(revision 107251) +++ gensupport.c(working copy) @@ -1242,7 +1242,7 @@ {"const_double_operand", false, {CONST_INT, CONST_DOUBLE}}, {"nonimmediate_operand", false, {SUBREG, REG, MEM}}, {"nonmemory_operand", false, {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, -false, LABEL_REF, SUBREG, REG}}, + LABEL_REF, SUBREG, REG}}, {"push_operand", false, {MEM}}, {"pop_operand", false, {MEM}}, {"memory_operand", false, {SUBREG, MEM}}, Cheers Graham
Re: Overwrite a file with "svn update"?
On Sat, 19 Nov 2005, Steve Kargl wrote: > On Sat, Nov 19, 2005 at 11:29:36AM -0800, Jim Blandy wrote: > I believe if the file is in a cvs repository and the copy > in your local tree was not obtained via a checkout, cvs > will replace the local file with whatever is in the repository. No, it'll continue to update the rest of the tree but emit an error (i.e. not bail out immediately like svn). IIRC. > > However, if I'm understanding it right, here Subversion is hesitating > > to replace a file with a file of the same name whose contents are the > > same. Is that correct? > > Yes. I see this regularly too, like when I write a test-case in another tree than where I'll commit it and forget to remove it before the next update of the first tree. I like Jim Blandy's suggestion that svn could just emit some informational message if the contents is the same as the some revision (first or HEAD presumably) and just go on. brgds, H-P
Re: Somebody broke bootstrap on trunk for x86_64
Graham Stott wrote: It looks kike that patch contains a typo The entry for nonmemory_operand has an extra bogus false I'm sorry. The patch has been in my powerpc-apple-darwin8.2.0 tree for months but rs6000 does not use nonmemory_operand. Thanks for fixing it. Paolo
Re: Overwrite a file with "svn update"?
Hans-Peter Nilsson <[EMAIL PROTECTED]> writes: > On Sat, 19 Nov 2005, Steve Kargl wrote: >> On Sat, Nov 19, 2005 at 11:29:36AM -0800, Jim Blandy wrote: >> I believe if the file is in a cvs repository and the copy >> in your local tree was not obtained via a checkout, cvs >> will replace the local file with whatever is in the repository. > > No, it'll continue to update the rest of the tree but emit an > error (i.e. not bail out immediately like svn). IIRC. If the local file is identical to the check-out version then there is no error and the local file becomes a version-controlled file. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: Overwrite a file with "svn update"?
On Sun, 20 Nov 2005, Andreas Schwab wrote: > Hans-Peter Nilsson <[EMAIL PROTECTED]> writes: > > On Sat, 19 Nov 2005, Steve Kargl wrote: > >> On Sat, Nov 19, 2005 at 11:29:36AM -0800, Jim Blandy wrote: > >> I believe if the file is in a cvs repository and the copy > >> in your local tree was not obtained via a checkout, cvs > >> will replace the local file with whatever is in the repository. > > > > No, it'll continue to update the rest of the tree but emit an > > error (i.e. not bail out immediately like svn). IIRC. > > If the local file is identical to the check-out version then there is no > error and the local file becomes a version-controlled file. I've never seen this, always the collision message, so I guess it's version-dependent. brgds, H-P
Re: Overwrite a file with "svn update"?
Hans-Peter Nilsson <[EMAIL PROTECTED]> writes: > I've never seen this, always the collision message, so I guess > it's version-dependent. It appears to work only with a local repository. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Re: can DECL_RESULT be 0?
On Thursday 17 November 2005 23:35, Jim Wilson wrote: > > I've checked in a patch to fix the comment typo. Thanks, What do you thing about adding an assert? Something similar to the attached patch. Rafael Index: gcc/function.c === --- gcc/function.c (revision 107249) +++ gcc/function.c (working copy) @@ -1711,8 +1711,11 @@ aggregate_value_p (tree exp, tree fntype { int i, regno, nregs; rtx reg; + tree type; - tree type = (TYPE_P (exp)) ? exp : TREE_TYPE (exp); + gcc_assert (exp != NULL_TREE); + + type = (TYPE_P (exp)) ? exp : TREE_TYPE (exp); if (fntype) switch (TREE_CODE (fntype)) @@ -3805,6 +3808,7 @@ allocate_struct_function (tree fndecl) cfun->decl = fndecl; result = DECL_RESULT (fndecl); + gcc_assert (result != NULL_TREE); if (aggregate_value_p (result, fndecl)) { #ifdef PCC_STATIC_STRUCT_RETURN pgp7LsOsWooHN.pgp Description: PGP signature
Creating temporary variables
Hi, I am working on some optimizations on the CFG. Can someone please give me some info on the following - 1. For an gimple expression node, how do we determine the return type? 2. How do we create a temporary variable, and add it to the list of variables defined in the current function declaration? 3. Any particular code I can look at to see how it works. 4. Any issues I should be aware of? Thanks Vibhav
Vectorizer in GCC 4.0
Hello Everyone, I am interested in knowing more about the vectorizer in GCC. Does anyone have or know of any statistics about the percentage of loops that can be vectorized in some benchmarks like MediaBench, SPEC2K and so forth? Thanking You, Yours Sincerely, Balaji V. Iyer.
ACATS script generation problem
Running make check stops in the Ada ACATS part, where it doesn't find the newly created binaries after a successful make bootstrap. (And after turning the computer off, going to sleep, turning it on and *not* again adding the different GNAT installation to PATH that was used for bootstrapping.) I think this is caused by where variables are set in run_acats, as outlined below. (Or has some PATH setting gone from the Makefiles?) Effects of $ make check[-ada] are these: $ make check ... === gcc Summary === # of expected passes37837 # of unexpected failures1 # of expected failures 97 # of untested testcases 28 # of unsupported tests 234 /werkstatt/georg/build/gcc/xgcc version 4.2.0 20051120 (experimental) ... .../src/gcc/gcc/testsuite/ada/acats/run_acats: line 11: type: gnatmake: not found ... === acats support === Generating support files... .../build/gcc/testsuite/ada/acats/host_gnatmake: line 5: exec: -q: invalid option exec: usage: exec [-cl] [-a name] file [redirection ...] Failed to compile macrosub make: *** [check-gnat] Error 1 $ This happens when running either $ make check from the top level build directory, or $make check-ada from the gcc directory below the top level. The shell script .../run_acats sets two variables, host_gnatchop=`type gnatchop | awk '{print $3}'` host_gnatmake=`type gnatmake | awk '{print $3}'` However, the programs gnatchop and gnatmake cannot be not found in $PATH yet because only later the script modifies PATH to include the new binaries. (Or else, the gnatchop and gnatmake programs will be from a different installation, if some full GNAT is still in $PATH ...) The script goes on to create two more scripts in the testsuite directories: host_gnatchop and host_gnatmake. It's using echo like this: echo PATH=`dirname $host_gnatmake`:'$PATH' >> host_gnatmake But $host_gnatmake is empty here, as per the above! Therefore, echo export PATH >> host_gnatmake echo exec $host_gnatmake '"$@"' >> host_gnatmake will result in the quoted error messages when run. Exec will only have an option (-q) to execute, so to speak. I thought a solution could then be to add the new GCC's GNAT binaries directory to $PATH before run_acats employs "type" to find them. However, this does not work. One effect is that system.ads is not found. I have the script print out the new settings: ROOT: /werkstatt/georg/build/gcc/testsuite/ada/acats PATH: /werkstatt/georg/build/gcc:\ /werkstatt/georg/build/gcc/testsuite/ada/acats:\ /usr/local/bin: etc as usual, no other gnatmake BASE: /werkstatt/georg/build/gcc === acats configuration === target gcc is /werkstatt/georg/build/gcc/xgcc -B/werkstatt/georg/build/gcc/ Reading specs from /werkstatt/georg/build/gcc/specs Target: i686-pc-linux-gnu Configured with: ../src/gcc/configure --prefix=/opt/GCC/42 --disable-nls --enable-languages=ada,c,c++,fortran Thread model: posix gcc version 4.2.0 20051120 (experimental) host=i486-linux-gnu target=i686-pc-linux-gnu gnatmake is /werkstatt/georg/build/gcc/gnatmake === acats support === Generating support files...fatal error, run-time library not installed correctly cannot locate file system.ads gnatmake: *** make failed. Failed to compile macrosub make: *** [check-gnat] Error 1 The system.ads is right there I think, $ head ada/rts/system.ads | cut -b-70 -- -- --GNAT RUN-TIME COMPONENTS -- -- S Y S T E M -- -- S p e c -- (GNU-Linux/x86 Version) -- -- Copyright (C) 1992-2005, Free Software Foundation, Inc. What's going on? Am I doing anything wrong? Linux sonnenregen 2.6.12-9-686-smp #1 SMP Mon Oct 10 Georg
Checksum mismatch
# svn up svn: Checksum mismatch for 'gcc/.svn/text-base/ChangeLog.svn-base'; expected: 'ce91f24c15d533874dc494b8fc6b0fde', actual: 'dfd84c36479cfdcd0b6576ecab266817' U gcc/DATESTAMP U gcc/tree-gimple.c U gcc/tree-gimple.h Thanks for some help. signature.asc Description: OpenPGP digital signature
Re: Checksum mismatch
Cauchy Song wrote: ># svn up > >svn: Checksum mismatch for 'gcc/.svn/text-base/ChangeLog.svn-base'; >expected: 'ce91f24c15d533874dc494b8fc6b0fde', actual: >'dfd84c36479cfdcd0b6576ecab266817' >U gcc/DATESTAMP >U gcc/tree-gimple.c >U gcc/tree-gimple.h > >Thanks for some help. > > > When I do svn cleanup or svn revert, be of no effect ~/cvs_work/gcc/gcc-4_1-branch$ svn revert ChangeLog Reverted 'ChangeLog' ~/cvs_work/gcc/gcc-4_1-branch$ svn up ChangeLog At revision 107274. ~/cvs_work/gcc/gcc-4_1-branch$ svn up U gcc/DATESTAMP svn: Checksum mismatch for 'gcc/.svn/text-base/ChangeLog.svn-base'; expected: 'ce91f24c15d533874dc494b8fc6b0fde', actual: 'dfd84c36479cfdcd0b6576ecab266817' ~/cvs_work/gcc/gcc-4_1-branch$ svn cleanup ~/cvs_work/gcc/gcc-4_1-branch$ svn up svn: Checksum mismatch for 'gcc/.svn/text-base/ChangeLog.svn-base'; expected: 'ce91f24c15d533874dc494b8fc6b0fde', actual: 'dfd84c36479cfdcd0b6576ecab266817' ~/cvs_work/gcc/gcc-4_1-branch$ svn up ChangeLog At revision 107274. How to do fix it? signature.asc Description: OpenPGP digital signature
Re: Creating temporary variables
VIbhav Garg <[EMAIL PROTECTED]> writes: > I am working on some optimizations on the CFG. Can someone please give > me some info on the following - > > 1. For an gimple expression node, how do we determine the return type? You can get the type of any gimple expression using TREE_TYPE. > 2. How do we create a temporary variable, and add it to the list of > variables defined in the current function declaration? create_tmp_var. > 3. Any particular code I can look at to see how it works. grep for create_tmp_var. > 4. Any issues I should be aware of? It kinds of depends on when during the compilation you are doing this. When in SSA form you probably need to do other stuff as well. Ian
A question about having multiple insns for one operation
Hi, I have a question about having multiple insns for one operation. Take m68k port for example. It has many SImode move insns like so: (define_insn "pushexthisi_const" [(set (match_operand:SI 0 "push_operand" "=m") (match_operand:SI 1 "const_int_operand" "J"))] (define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=a") (match_operand:QI 1 "address_operand" "p"))] (define_insn "movsi_const0" [(set (match_operand:SI 0 "nonimmediate_operand" "=g") (const_int 0))] (define_insn "" ;; Notes: make sure no alternative allows g vs g. ;; We don't allow f-regs since fixed point cannot go in them. [(set (match_operand:SI 0 "nonimmediate_operand" "=g,d,a<") (match_operand:SI 1 "general_src_operand" "daymSKT,n,i"))] "!TARGET_COLDFIRE" Now, is it OK to have this many? IIRC, reload makes certain changes to insns without re-recognizing modified ones. (Well, it used to at least.) A few years ago, I ran into this kind of trouble in H8 port having multiple add insns, which were cleaned up soon afterwards. Aside from reload issues, are there other potential problems with having multiple insns for one operation? Maybe maintainance reasons? Having multiple move insns may make it difficult for people to figure out which pattern a given insn matches because we would have to go through a machine description to find the first matching insn. (By the way, I do understand that it's OK to have multiple patterns for different targets because values of TARGET_xxx don't change within one run of cc1.) FWIW, the second define_insn above could have "plus" in operands[1], in which case it overlaps with other insns with plus. Thanks in advance, Kazu Hirata
Abnormal behavior of malloc in gcc-3.2.2
Hi Everyone, int main () { int *p; int i; p = (int *) malloc (400 * sizeof (int)); for (i = 0; i < 512; i++) { p[i] = i; printf ("p[%d]: %d\n", i, p[i]); } return 0; } The following code should terminate with Segmentation fault, right ? But when I tried, it works even beyond the limits of allocated area ... I am using Glibc - 2.3.2-11.9 , gcc - 3.2.2 Is it a bug - malloc's implementation in Glibc. Does malloc allocates a complete 4k page for certain size of memory asked for? Infact, it gives a segmentation fault at 1681 location => p[1681]: 1681 Segmentation fault Or is it using Heap area ? -- Regards, Sandeep
Re: Abnormal behavior of malloc in gcc-3.2.2
> > Hi Everyone, > > int > main () > { > int *p; > int i; > > p = (int *) malloc (400 * sizeof (int)); > for (i = 0; i < 512; i++) > { > p[i] = i; > printf ("p[%d]: %d\n", i, p[i]); > } >return 0; > } > > The following code should terminate with Segmentation fault, right ? > But when I tried, it works even beyond the limits of allocated area ... > I am using Glibc - 2.3.2-11.9 , gcc - 3.2.2 > > Is it a bug - malloc's implementation in Glibc. > Does malloc allocates a complete 4k page for certain size of memory asked > for? > > Infact, it gives a segmentation fault at 1681 location => > p[1681]: 1681 > Segmentation fault > > Or is it using Heap area ? First why do you think this is a GCC bug? Second you are invoking undefined behavior by accessing passed the array bounds (or allocated bounds by malloc). -- Pinski
Re: Abnormal behavior of malloc in gcc-3.2.2
> > Second you are invoking undefined behavior by accessing passed the array > > bounds (or allocated > > bounds by malloc). > > I didnt get your point. I am allocating space only for 400 inregers > then as soon as in the loop if it crosses the value of 400 , it should > have given a segementation voilation ? > But is isint. Fine i agree this is not the job of the compiler, It > might never come into exesitence during the execution time, But Still > me must get a segmentation voilation by the operating system. No, no, no. You don't understand at all undefined behavior. Anything can happen. If you pass 400*sizeof(int) then it might work or it might not. It all depends on where the malloc allocates its memory. It could malloc it at the end of the page so that you will get a seg fault right away or after a while. --- Pinski
Re: Abnormal behavior of malloc in gcc-3.2.2
On 11/20/05, Andrew Pinski <[EMAIL PROTECTED]> wrote: > > > Second you are invoking undefined behavior by accessing passed the array > > > bounds (or allocated > > > bounds by malloc). > > > > I didnt get your point. I am allocating space only for 400 inregers > > then as soon as in the loop if it crosses the value of 400 , it should > > have given a segementation voilation ? > > But is isint. Fine i agree this is not the job of the compiler, It > > might never come into exesitence during the execution time, But Still > > me must get a segmentation voilation by the operating system. > > No, no, no. You don't understand at all undefined behavior. Anything can > happen. > If you pass 400*sizeof(int) then it might work or it might not. It all > depends on > where the malloc allocates its memory. It could malloc it at the end of the > page so > that you will get a seg fault right away or after a while. ya. Thanks a lot sir. I was really bugged with this problem since last few days. I am clear with it. I think i need to go through the basics again. -- Regards, Sandeep
Re: Abnormal behavior of malloc in gcc-3.2.2
On 11/20/05, Andrew Pinski <[EMAIL PROTECTED]> wrote: > > > > Hi Everyone, > > > > int > > main () > > { > > int *p; > > int i; > > > > p = (int *) malloc (400 * sizeof (int)); > > for (i = 0; i < 512; i++) > > { > > p[i] = i; > > printf ("p[%d]: %d\n", i, p[i]); > > } > >return 0; > > } > > > > The following code should terminate with Segmentation fault, right ? > > But when I tried, it works even beyond the limits of allocated area ... > > I am using Glibc - 2.3.2-11.9 , gcc - 3.2.2 > > > > Is it a bug - malloc's implementation in Glibc. > > Does malloc allocates a complete 4k page for certain size of memory asked > > for? > > > > Infact, it gives a segmentation fault at 1681 location => > > p[1681]: 1681 > > Segmentation fault > > > > Or is it using Heap area ? > > First why do you think this is a GCC bug? Actually i felt that if its not coming up witha segmentation fault, Then might be something goes behind during the compile time. How much memory is actually allocated by the malloc, I googled through the sources of Glibc but i was not able to find any info. If I am wrong somewhere please help. > Second you are invoking undefined behavior by accessing passed the array > bounds (or allocated > bounds by malloc). I didnt get your point. I am allocating space only for 400 inregers then as soon as in the loop if it crosses the value of 400 , it should have given a segementation voilation ? But is isint. Fine i agree this is not the job of the compiler, It might never come into exesitence during the execution time, But Still me must get a segmentation voilation by the operating system. Regards, Sandeep
Re: Creating temporary variables
Ian Lance Taylor wrote: > VIbhav Garg <[EMAIL PROTECTED]> writes: > > >>I am working on some optimizations on the CFG. Can someone please give >>me some info on the following - >> >>1. For an gimple expression node, how do we determine the return type? > > > You can get the type of any gimple expression using TREE_TYPE. > > >>2. How do we create a temporary variable, and add it to the list of >>variables defined in the current function declaration? > > > create_tmp_var. I have seen calls to add_referenced_tmp_var after a call to create_tmp_var. Is this necessary? > > >>3. Any particular code I can look at to see how it works. > > > grep for create_tmp_var. > > >>4. Any issues I should be aware of? > > > It kinds of depends on when during the compilation you are doing this. > When in SSA form you probably need to do other stuff as well. I am doing this before SSA form is applied but after CFG is built. > > Ian >
Re: Checksum mismatch
Since this is a Subversion problem, and not a GCC problem, it would probably be best to ask this question on [EMAIL PROTECTED] (I don't know the answer; I don't see anything in the FAQ or in the book. So I think this is an excellent question to ask.)
Re: ACATS script generation problem
> Running make check stops in the Ada ACATS part, > where it doesn't find the newly created binaries > after a successful make bootstrap. (And after turning > the computer off, going to sleep, turning it on and > *not* again adding the different GNAT installation to > PATH that was used for bootstrapping.) That's the issue. As for building GNAT, you do need the same environment to run make check-ada, meaning an existing Ada compiler in your PATH to support the infrastructure of make check (this compiler is not tested by make check-ada, only used by the infrastructure). Alternatively, doing a make install and having this new compiler in your PATH would also work fine. Arno