[Bug bootstrap/57087] make failed: libmpfr not found or uses a different ABI

2013-04-27 Thread ExtraLeveLInSoftware at ntlworld dot com

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57087

--- Comment #1 from Ellis N. Thomas ExtraLeveLInSoftware at ntlworld dot com 
2013-04-27 08:10:58 UTC ---
Comment on attachment 29950
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29950
Notes on installation of gcc-4.7.2

Notes on installation of gcc-4.7.2

To: gcc-bugs

1. Introduction

   Trying to build gcc-4.7.2.

   Running Mac OS X:

 System Version:   Mac OS X 10.5.8 (9L30)
 Kernel Version:   Darwin 9.8.0
 uname -mpv
 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; 
 root:xnu-1228.15.4~1/RELEASE_I386 i386 i386

   This bug report concerns the following points.

  - Incomplete information provided in the INSTALL HTML files

  - An error reported by make


2. Information in the INSTALL HTML files

   The prerequisites.html states:
Newer versions may work in some cases, but it's safer to use the exact 
versions
documented. We appreciate bug reports about problems with newer versions,
though.

   and lists:

GNU Multiple Precision Library (GMP) version 4.3.2 (or later)
MPFR Library version 2.4.2 (or later)
MPC Library version 0.8.1 (or later)

   The download.html states:

Likewise the GMP, MPFR and MPC libraries can be automatically built together
with GCC. Unpack the GMP, MPFR and/or MPC source distributions in the directory
containing the GCC sources and rename their directories to gmp, mpfr and mpc,
respectively (or use symbolic links with the same name).


3. Report from configure

   The command was gcc-4.7.2/configure --enable-languages=ada,c,c++ 

   When gcc-4.7.2/configure was run, it responded :
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+
...

   The latest sources were obtained from
ftp://www.mirrorservice.org/sites/ftp.gnu.org/gnu/

gmp-5.1.0a.tar.bz2
mpc-1.0.1.tar.gz
mpfr-3.1.1.tar.gz

   These were used for starting the gcc build.
Directories:

/Gnu/gcc/src/gcc-4.7.2/Sources preparing for installation
/Gnu/gcc/obj/  Area for building

/Gnu/gmp/gmp-5.1.0 Sources preparing for installation
/Gnu/mpfr/mpfr-3.1.1   Ditto
/Gnu/mpc/mpc-1.0.1 Ditto

The gcc directory includes links for gmp, mpfr, and mpc

/Gnu/gcc/src/gcc-4.7.2/gmp - /Gnu/gmp/gmp-5.1.0
/Gnu/gcc/src/gcc-4.7.2/mpc - /Gnu/mpc/mpc-1.0.1
/Gnu/gcc/src/gcc-4.7.2/mpfr - /Gnu/mpfr/mpfr-3.1.1


4. An error reported by make

   The make failed, with last few messages:
configure: error: libmpfr not found or uses a different ABI (including static 
vs shared).
make[2]: *** [configure-stage1-mpc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

   Help was sought from the gcc-help mailing list (see:
March 21, 2013, Error in make building gcc-4.7.2)

   A response from Tim Prince suggested using the exact versions cited in
the INSTALL HTML files.  This referred to: gcc/contrib/download_prerequisites
However, there is no mention of this in the INSTALL HTML files.


5. Repeat with cited versions

   To eliminate any side-effects from previous failed runs, the 
 directories were cleared, and files re-extracted from ../gcc-4.7.2.tar.gz.

   Then downloaded the versions of mpfr, mpc, and gmp listed in
src/gcc-4.7.2/contrib/download_prerequisites, using ftp rather than wget (wget
not available, but ftp seems to operate the same).

MPFR=mpfr-2.4.2
GMP=gmp-4.3.2
MPC=mpc-0.8.1

/Gnu/mpfr/mpfr-2.4.2
/Gnu/gmp/gmp-4.3.2
/Gnu/mpc/mpc-0.8.1

   Changed links in /Gnu/gcc/src/gcc-4.7.2 for mpfr, mpc, and gmp
to the new ones.

   Redid configure and make.  This ran much further than previous attempts.
So these versions of gmp, mpc, and mpfr seem to be better.

   (The ultimate failure of this build seems unrelated to this libmpfr
problem, but remains unexplained at present.)


6. Summary of Bugs

6.1 Incomplete information provided in the INSTALL HTML files

   There is no mention of contrib/download_prerequisites.  There seem to be
many other things in contrib/ which are also not explained.

   These should be included in the INSTALL files, and the point about
safer to use the exact versions could be stressed or qualified with known
problems.  This specially applies to use of (or later).

   Commands like download_prerequisites need care not to use commands like
wget, which is not available on my platform (however ftp seems to operate the
same).

6.2 An error reported by make

   Building failed as in section 4 above using:

gmp-5.1.0
mpfr-3.1.1
mpc-1.0.1

   Possibly this only concerns libmpfr, but it is not clear whether or
not the other two have proceeded correctly.

   It is also not clear whether this is a problem specific to my platform.

6.3If extra information about the matters reported above would be of value
please contact:
   ExtraLeveLInSoftware at ntlworld dot com

Ellis N. Thomas/26-Apr-2013

[Bug libgcc/57085] Segmentation Fault when building a c file

2013-04-27 Thread mikpe at it dot uu.se


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57085



--- Comment #1 from Mikael Pettersson mikpe at it dot uu.se 2013-04-27 
10:00:13 UTC ---

Please attach _preprocessed_ source for the test case, and tell us what options

gcc was invoked when compiling the test case.


[Bug middle-end/57089] New: [4.9 Regression] ICE in verify_loop_structure, at cfgloop.c:1647

2013-04-27 Thread Joost.VandeVondele at mat dot ethz.ch

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57089

 Bug #: 57089
   Summary: [4.9 Regression] ICE in  verify_loop_structure, at
cfgloop.c:1647
Classification: Unclassified
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: joost.vandevond...@mat.ethz.ch


rev 198328 is still OK, 198353 fails.

 cat bug.f90 
  SUBROUTINE T()
INTEGER:: npoints, grad_deriv
SELECT CASE(grad_deriv)
CASE (0)
   !$omp do
   DO ii=1,npoints
   END DO
END SELECT
  END SUBROUTINE 

 gfortran -fopenmp -c -O2 bug.f90 
bug.f90: In function ‘t’:
bug.f90:9:0: error: loop with header 7 not in loop tree
   END SUBROUTINE 
 ^
bug.f90:9:0: internal compiler error: in verify_loop_structure, at
cfgloop.c:1647
0x6b4665 verify_loop_structure()
../../gcc/gcc/cfgloop.c:1647
0x89ab3d loop_optimizer_init(unsigned int)
../../gcc/gcc/loop-init.c:109
0xa7ff23 perform_tree_ssa_dce
../../gcc/gcc/tree-ssa-dce.c:1554

[Bug fortran/50438] [F03] proc pointer to subroutine in structure constructors

2013-04-27 Thread janus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50438



janus at gcc dot gnu.org changed:



   What|Removed |Added



 Status|NEW |ASSIGNED

 AssignedTo|unassigned at gcc dot   |janus at gcc dot gnu.org

   |gnu.org |



--- Comment #5 from janus at gcc dot gnu.org 2013-04-27 11:33:29 UTC ---

(In reply to comment #3)

 Here is a simple patch to avoid this:



 [...]



 It cures both test cases, but I'm pretty sure it will have quite a number of

 testsuite failures (haven't checked yet).



The patch from comment #3 indeed shows a huge number of failures (as expected).





 If we remove it here,

 'gfc_reduce_init_expr' should be called somewhere at resolution stage, of

 course! We just need a suitable place for doing this ...



e.g. something like 'resolve_values' or 'resolve_structure_cons'?





However, I'm thinking that this approach may be too big of a hammer for the

problem at hand. A somewhat less invasive patch:



Index: gcc/fortran/expr.c

===

--- gcc/fortran/expr.c(revision 198155)

+++ gcc/fortran/expr.c(working copy)

@@ -2522,6 +2522,8 @@ gfc_check_init_expr (gfc_expr *e)



   break;

 }

+  else if (e-symtree-n.sym-attr.flavor == FL_PROCEDURE)

+break;



   if (gfc_in_match_data ())

 break;





This is also sufficient to remove the error. Regtesting now ...


[Bug target/56866] gcc 4.7.x/gcc-4.8.x with '-O3 -march=bdver2' misscompiles glibc-2.17/crypt/sha512.c

2013-04-27 Thread jakub at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56866



Jakub Jelinek jakub at gcc dot gnu.org changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED



--- Comment #16 from Jakub Jelinek jakub at gcc dot gnu.org 2013-04-27 
12:30:55 UTC ---

Author: jakub

Date: Sat Apr 27 12:26:05 2013

New Revision: 198355



URL: http://gcc.gnu.org/viewcvs?rev=198355root=gccview=rev

Log:

PR target/56866

* config/i386/i386.c (ix86_expand_mul_widen_evenodd): Don't

use xop_pmacsdqh if uns_p.

* config/i386/sse.md (xop_rotrmode3): Fix up computation of

the immediate rotate count.



* gcc.c-torture/execute/pr56866.c: New test.

* gcc.target/i386/pr56866.c: New test.



Added:

trunk/gcc/testsuite/gcc.c-torture/execute/pr56866.c

trunk/gcc/testsuite/gcc.target/i386/pr56866.c

Modified:

trunk/gcc/ChangeLog

trunk/gcc/config/i386/i386.c

trunk/gcc/config/i386/sse.md

trunk/gcc/testsuite/ChangeLog



Author: jakub

Date: Sat Apr 27 12:27:08 2013

New Revision: 198356



URL: http://gcc.gnu.org/viewcvs?rev=198356root=gccview=rev

Log:

PR target/56866

* config/i386/i386.c (ix86_expand_mul_widen_evenodd): Don't

use xop_pmacsdqh if uns_p.

* config/i386/sse.md (xop_rotrmode3): Fix up computation of

the immediate rotate count.



* gcc.c-torture/execute/pr56866.c: New test.

* gcc.target/i386/pr56866.c: New test.



Added:

branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/execute/pr56866.c

branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr56866.c

Modified:

branches/gcc-4_8-branch/gcc/ChangeLog

branches/gcc-4_8-branch/gcc/config/i386/i386.c

branches/gcc-4_8-branch/gcc/config/i386/sse.md

branches/gcc-4_8-branch/gcc/testsuite/ChangeLog



Author: jakub

Date: Sat Apr 27 12:28:45 2013

New Revision: 198357



URL: http://gcc.gnu.org/viewcvs?rev=198357root=gccview=rev

Log:

PR target/56866

* config/i386/sse.md (xop_rotrmode3): Fix up computation of

the immediate rotate count.



* gcc.c-torture/execute/pr56866.c: New test.

* gcc.target/i386/pr56866.c: New test.



Added:

branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/execute/pr56866.c

branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr56866.c

Modified:

branches/gcc-4_7-branch/gcc/ChangeLog

branches/gcc-4_7-branch/gcc/config/i386/sse.md

branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug target/56866] [4.7/4.8/4.9 Regression] with '-O3 -march=bdver2' misscompiles glibc-2.17/crypt/sha512.c

2013-04-27 Thread jakub at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56866



Jakub Jelinek jakub at gcc dot gnu.org changed:



   What|Removed |Added



   Target Milestone|--- |4.7.4

Summary|gcc 4.7.x/gcc-4.8.x with|[4.7/4.8/4.9 Regression]

   |'-O3 -march=bdver2' |with '-O3 -march=bdver2'

   |misscompiles|misscompiles

   |glibc-2.17/crypt/sha512.c   |glibc-2.17/crypt/sha512.c


[Bug bootstrap/57087] make failed: libmpfr not found or uses a different ABI

2013-04-27 Thread redi at gcc dot gnu.org

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57087

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org 2013-04-27 
12:47:38 UTC ---
(In reply to comment #1)
  A response from Tim Prince suggested using the exact versions cited in
 the INSTALL HTML files.  This referred to: gcc/contrib/download_prerequisites
 However, there is no mention of this in the INSTALL HTML files.

That's not a bug, using the script is not required, it's just a convenience.
You could have downloaded the correct versions by hand, you chose to use
different versions.

 5. Repeat with cited versions
 
  To eliminate any side-effects from previous failed runs, the 
  directories were cleared, and files re-extracted from ../gcc-4.7.2.tar.gz.

Re-extracting the tarball is not necessary, the benefit of building in a
separate obj dir is the src dir is untouched by the build process.

  Redid configure and make.  This ran much further than previous attempts.
 So these versions of gmp, mpc, and mpfr seem to be better.

That's why the installation docs say to use them.


 6. Summary of Bugs
 
 6.1 Incomplete information provided in the INSTALL HTML files
 
  There is no mention of contrib/download_prerequisites.  There seem to be
 many other things in contrib/ which are also not explained.

Not a bug.


  These should be included in the INSTALL files, and the point about
 safer to use the exact versions could be stressed or qualified with known
 problems.  This specially applies to use of (or later).
 
  Commands like download_prerequisites need care not to use commands like
 wget, which is not available on my platform (however ftp seems to operate the
 same).

It is available, you just have to install it.

The download_prerequisites script is not necessary for building GCC, so it's
not a bug that you had to download the files another way.

 6.2 An error reported by make
 
  Building failed as in section 4 above using:
 
 gmp-5.1.0
 mpfr-3.1.1
 mpc-1.0.1
 
  Possibly this only concerns libmpfr, but it is not clear whether or
 not the other two have proceeded correctly.
 
  It is also not clear whether this is a problem specific to my platform.

Possibly related to PR 50461 although the error is different.

[Bug fortran/57071] Optimize (-1)**k to 1 - 2 * mod(K, 2)

2013-04-27 Thread tkoenig at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57071



Thomas Koenig tkoenig at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |ASSIGNED

   Last reconfirmed||2013-04-27

 AssignedTo|unassigned at gcc dot   |tkoenig at gcc dot gnu.org

   |gnu.org |

 Ever Confirmed|0   |1



--- Comment #7 from Thomas Koenig tkoenig at gcc dot gnu.org 2013-04-27 
13:01:26 UTC ---

I have a patch.


[Bug fortran/53298] ICE in gfc_conv_scalarized_array_ref for ARRAY + substring

2013-04-27 Thread dominiq at lps dot ens.fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53298



Dominique d'Humieres dominiq at lps dot ens.fr changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-04-27

 Ever Confirmed|0   |1



--- Comment #2 from Dominique d'Humieres dominiq at lps dot ens.fr 2013-04-27 
13:31:04 UTC ---

The ICE occurs also with the fortran-dev branch (r198346 with the patch at

http://gcc.gnu.org/ml/fortran/2013-04/msg00237.html).


[Bug fortran/56800] [fortran-dev Regression] move_alloc_13.f90 failure

2013-04-27 Thread dominiq at lps dot ens.fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56800



Dominique d'Humieres dominiq at lps dot ens.fr changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-04-27

 Ever Confirmed|0   |1



--- Comment #4 from Dominique d'Humieres dominiq at lps dot ens.fr 2013-04-27 
13:42:51 UTC ---

Confirmed for the fortran-dev branch r198346 with the patch at

http://gcc.gnu.org/ml/fortran/2013-04/msg00237.html.


[Bug fortran/57090] New: FAIL: gfortran.dg/alloc_comp_bounds_1.f90 -O* execution test

2013-04-27 Thread dominiq at lps dot ens.fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57090



 Bug #: 57090

   Summary: FAIL: gfortran.dg/alloc_comp_bounds_1.f90  -O*

execution test

Classification: Unclassified

   Product: gcc

   Version: fortran-dev

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: fortran

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: domi...@lps.ens.fr

CC: bur...@gcc.gnu.org





The test gfortran.dg/alloc_comp_bounds_1.f90 fails when compile with the

fortran-dev branch. Reduced test:



  integer, parameter :: ik4 = 4

  integer, parameter :: ik8 = 8

  integer, parameter :: from = -1, to = 2

  call foo

  call bar

contains

  subroutine foo

type :: struct

  integer(4), allocatable :: ib(:)

end type struct

integer(ik4), allocatable :: ia(:)

type(struct) :: x

allocate(ia(from:to))

x=struct(ia(:))

print *, lbound(x%ib), ubound(x%ib),   expected  1 4

!if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) call abort

deallocate(ia)

  end subroutine

  subroutine bar

type :: struct

  integer(4), allocatable :: ib(:)

end type struct

integer(ik8), allocatable :: ia(:)

type(struct) :: x

allocate(ia(from:to))

x=struct(ia)

print *, lbound(x%ib), ubound(x%ib),   expected -1 2

!if (any(lbound(x%ib) .ne. -1) .or. any(ubound(x%ib) .ne. 2)) call abort

x=struct(ia(:))

print *, lbound(x%ib), ubound(x%ib),   expected  1 4

!if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) call abort

x=struct(ia(from:to))

print *, lbound(x%ib), ubound(x%ib),   expected  1 4

!if (any(lbound(x%ib) .ne. 1) .or. any(ubound(x%ib) .ne. 4)) call abort

deallocate(ia)

  end subroutine

end



output



   1   6   expected  1 4

  -1   1   expected -1 2

   1   5   expected  1 4

   1   5   expected  1 4


[Bug fortran/50438] [F03] proc pointer to subroutine in structure constructors

2013-04-27 Thread janus at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50438



--- Comment #6 from janus at gcc dot gnu.org 2013-04-27 15:31:29 UTC ---

(In reply to comment #5)

 This is also sufficient to remove the error. Regtesting now ...



The patch in comment 5 regtests cleanly. However, it only fixes comment 1 but

not comment 0.


[Bug target/56716] during gcc 4.8.0 build on Cygwin: bid128_fma.c:4460:1: internal compiler error: Segmentation fault

2013-04-27 Thread gccbugzi...@tru-traffic.com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56716



--- Comment #7 from Greg gccbugzi...@tru-traffic.com 2013-04-27 16:16:02 UTC 
---

(In reply to comment #6)

  Can you please provide a backtrace from the crash?



Alas, no success.  gdb reports No stack. after the crash.  I'd used



make BOOT_CFLAGS='-g -O' bootstrap



I'm happy to help if I can.  Any suggestions on what more I can do?


[Bug target/57091] New: [4.8/4.9 Regression] ICE: in assign_by_spills, at lra-assigns.c:1268 with -mcmodel=large and indirect call

2013-04-27 Thread zsojka at seznam dot cz


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57091



 Bug #: 57091

   Summary: [4.8/4.9 Regression] ICE: in assign_by_spills, at

lra-assigns.c:1268 with -mcmodel=large and indirect

call

Classification: Unclassified

   Product: gcc

   Version: 4.9.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: target

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: zso...@seznam.cz





Created attachment 29953

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29953

reduced testcase



Compiler output:

$ gcc -O -mcmodel=large testcase.c 

testcase.c: In function 'foo':

testcase.c:6:1: internal compiler error: in assign_by_spills, at

lra-assigns.c:1270

 }

 ^

0x8f04a4 assign_by_spills

/mnt/svn/gcc-trunk/gcc/lra-assigns.c:1270

0x8f1693 lra_assign()

/mnt/svn/gcc-trunk/gcc/lra-assigns.c:1427

0x8ece6c lra(_IO_FILE*)

/mnt/svn/gcc-trunk/gcc/lra.c:2308

0x8a0268 do_reload

/mnt/svn/gcc-trunk/gcc/ira.c:4619

0x8a0268 rest_of_handle_reload

/mnt/svn/gcc-trunk/gcc/ira.c:4731

Please submit a full bug report,

with preprocessed source if appropriate.

Please include the complete backtrace with any bug report.

See http://gcc.gnu.org/bugs.html for instructions.



Tested revisions:

r198354 - crash

4.8 r198018 - crash

4.7 r198018 - OK


[Bug c++/56953] Inheriting constructors triggers instantiation of parameters at point of declaration

2013-04-27 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56953



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||WORKSFORME



--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com 2013-04-27 
18:38:21 UTC ---

Luc, please reopen if you can still see something wrong. Thanks.


[Bug c++/57092] New: Using decltype of function pointer type to define a data member causes compiler crash

2013-04-27 Thread kjw.chiu at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57092



 Bug #: 57092

   Summary: Using decltype of function pointer type to define a

data member causes compiler crash

Classification: Unclassified

   Product: gcc

   Version: 4.8.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: c++

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: kjw.c...@gmail.com





This code:



template void (*F)(int)

class B {

decltype(F) v;

};



void foo(int) {}



int main() {

Bfoo o;

}



causes this crash:



$ g++ -std=c++11 bug.cpp

bug.cpp: In instantiation of 'class Bfoo':

bug.cpp:9:12:   required from here

bug.cpp:3:17: internal compiler error: in finish_decltype_type, at

cp/semantics.c:5365

 decltype(F) v;

 ^

0x5a6230 finish_decltype_type(tree_node*, bool, int)

../../src/gcc/cp/semantics.c:5365

0x521c5c tsubst(tree_node*, tree_node*, int, tree_node*)

../../src/gcc/cp/pt.c:11772

0x51fe2e tsubst_decl

../../src/gcc/cp/pt.c:10450

0x5218a7 tsubst(tree_node*, tree_node*, int, tree_node*)

../../src/gcc/cp/pt.c:11081

0x52f177 instantiate_class_template_1

../../src/gcc/cp/pt.c:8818

0x52f177 instantiate_class_template(tree_node*)

../../src/gcc/cp/pt.c:9054

0x57ce2d complete_type(tree_node*)

../../src/gcc/cp/typeck.c:131

0x4ff471 start_decl_1(tree_node*, bool)

../../src/gcc/cp/decl.c:4662

0x50d294 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,

tree_node*, tree_node*, tree_node**)

../../src/gcc/cp/decl.c:4625

0x572b98 cp_parser_init_declarator

../../src/gcc/cp/parser.c:15914

0x5734ce cp_parser_simple_declaration

../../src/gcc/cp/parser.c:10567

0x56edd0 cp_parser_block_declaration

../../src/gcc/cp/parser.c:10448

0x56fdf0 cp_parser_declaration_statement

../../src/gcc/cp/parser.c:10092

0x570497 cp_parser_statement

../../src/gcc/cp/parser.c:8867

0x57167e cp_parser_statement_seq_opt

../../src/gcc/cp/parser.c:9139

0x57179e cp_parser_compound_statement

../../src/gcc/cp/parser.c:9093

0x5718e8 cp_parser_function_body

../../src/gcc/cp/parser.c:17680

0x5718e8 cp_parser_ctor_initializer_opt_and_function_body

../../src/gcc/cp/parser.c:17716

0x57252f cp_parser_function_definition_after_declarator

../../src/gcc/cp/parser.c:21691

0x573143 cp_parser_function_definition_from_specifiers_and_declarator

../../src/gcc/cp/parser.c:21612

Please submit a full bug report,

with preprocessed source if appropriate.

Please include the complete backtrace with any bug report.

See http://gcc.gnu.org/bugs.html for instructions.


[Bug fortran/57093] New: Seg fault on internal output to a character scalar coarray

2013-04-27 Thread damian at rouson dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57093



 Bug #: 57093

   Summary: Seg fault on internal output to a character scalar

coarray

Classification: Unclassified

   Product: gcc

   Version: 4.9.0

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: fortran

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: dam...@rouson.net





$ cat co_hello.f90 

program main 

 ! len25 produces the expected result len=25 seg faults 

  character(len=25), allocatable :: greeting[:] 

  allocate(greeting[*])

  write(greeting,(a)) z

end 



$ gfortran -fcoarray=single co_hello.f90 



$ ./a.out

a.out(35951) malloc: *** error for object 0x7fc5ba404c20: pointer being freed

was not allocated

*** set a breakpoint in malloc_error_break to debug



Program received signal SIGABRT: Process abort signal.



Backtrace for this error:

#0  0x1055d2e62

#1  0x1055d362e

#2  0x7fff90ae6949

Abort trap: 6



$ gfortran --version

GNU Fortran (MacPorts gcc49 4.9-20130414_0) 4.9.0 20130414 (experimental)


[Bug c++/57092] [4.8/4.9 Regression] Using decltype of function pointer type to define a data member causes compiler crash

2013-04-27 Thread paolo.carlini at oracle dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57092



Paolo Carlini paolo.carlini at oracle dot com changed:



   What|Removed |Added



 Status|UNCONFIRMED |NEW

   Last reconfirmed||2013-04-27

Summary|Using decltype of function  |[4.8/4.9 Regression] Using

   |pointer type to define a|decltype of function

   |data member causes compiler |pointer type to define a

   |crash   |data member causes compiler

   ||crash

 Ever Confirmed|0   |1



--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2013-04-27 
21:22:47 UTC ---

Unhandled ADDR_EXPR.


[Bug fortran/57090] [Fortran-Dev] FAIL: gfortran.dg/alloc_comp_bounds_1.f90 -O* execution test

2013-04-27 Thread dominiq at lps dot ens.fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57090



--- Comment #1 from Dominique d'Humieres dominiq at lps dot ens.fr 2013-04-27 
21:51:53 UTC ---

If in the reduced test I print also the size of x%ib, the output becomes



   1   6   expected  1 4   6

  -1   1   expected -1 2   3

   1   5   expected  1 4   5

   1   5   expected  1 4   5



This also explains the failure of alloc_comp_constructor_1.f90. With the

following changes



--- /opt/gcc/for_work/gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f90   

2010-04-06 17:08:13.0 +0200

+++ alloc_comp_constructor_1_db_2.f902013-04-27 23:50:22.0 +0200

@@ -40,7 +40,8 @@ Program test_constructor

 if (any(lbound(x%a) /= lbound(y))) call abort()

 if (any(ubound(x%a) /= ubound(y))) call abort()

 if (any(x%a /= y)) call abort()

-if (size(x%q) /= 2) call abort()

+print *, size(x%q)

+!if (size(x%q) /= 2) call abort()

 do i = 1, 2

 if (any(x%q(i)%a /= foo%a)) call abort()

 end do

@@ -81,7 +82,8 @@ contains

 if (any(lbound(x%a) /= lbound(y))) call abort()

 if (any(ubound(x%a) /= ubound(y))) call abort()

 if (any(x%a /= y)) call abort()

-if (size(x%q) /= 2) call abort()

+print *, size(x%q)

+!if (size(x%q) /= 2) call abort()

 do i = 1, 2

 if (any(x%q(i)%a /= foo%a)) call abort()

 end do



the test passes and output



   3

   3


[Bug target/56716] during gcc 4.8.0 build on Cygwin: bid128_fma.c:4460:1: internal compiler error: Segmentation fault

2013-04-27 Thread gccbugzi...@tru-traffic.com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56716



--- Comment #8 from Greg gccbugzi...@tru-traffic.com 2013-04-27 21:54:25 UTC 
---

(In reply to comment #7)

 (In reply to comment #6)

   Can you please provide a backtrace from the crash?

 

 Alas, no success.  gdb reports No stack. after the crash.  I'd used

 

 make BOOT_CFLAGS='-g -O' bootstrap

 

 I'm happy to help if I can.  Any suggestions on what more I can do?



To be more complete, here's the entire set of commands that I entered, along

with the screen output (which is abbreviated for most of the build):



$ make BOOT_CFLAGS='-g -O' bootstrap



...(redacted)



/home/gbullock/gcc48o/./gcc/xgcc -B/home/gbullock/gcc48o/./gcc/

-L/home/gbullock/gcc48o/i686-pc-mingw32/winsup/mingw

-L/home/gbullock/gcc48o/i686-pc-mingw32/winsup/w32api/lib -isystem

/home/gbullock/gcc-4_8/winsup/mingw/

include -isystem /home/gbullock/gcc-4_8/winsup/w32api/include

-B/usr/local/i686-pc-mingw32/bin/ -B/usr/local/i686-pc-mingw32/lib/ -isystem

/usr/local/i686-pc-mingw32/include -isystem

/usr/local/i686-pc-mingw32/sys-includ

e-g -O2 -O2 -I../../../gcc-4_8/libgcc/../winsup/w32api/include -g -O2

-DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual

-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem

./include

   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -I. -I.

-I../.././gcc -I../../../gcc-4_8/libgcc -I../../../gcc-4_8/libgcc/.

-I../../../gcc-4_8/libgcc/../gcc -I../../../gcc-4_8/libgcc/../include

-I../../../gcc

-4_8/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS

-DUSE_EMUTLS -o bid128_fma.o -MT bid128_fma.o -MD -MP -MF bid128_fma.dep -c

../../../gcc-4_8/libgcc/config/libbid/bid128_fma.c

../../../gcc-4_8/libgcc/config/libbid/bid128_fma.c:4460:1: internal compiler

error: Segmentation fault

 }

 ^

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

make[3]: *** [bid128_fma.o] Error 1

make[3]: Leaving directory `/home/gbullock/gcc48o/i686-pc-mingw32/libgcc'

make[2]: *** [all-stage2-target-libgcc] Error 2

make[2]: Leaving directory `/home/gbullock/gcc48o'

make[1]: *** [stage2-bubble] Error 2

make[1]: Leaving directory `/home/gbullock/gcc48o'

make: *** [bootstrap] Error 2



$ cd /home/gbullock/gcc48o/i686-pc-mingw32/libgcc

$ export PATH=/home/gbullock/gcc48o/./gcc/:$PATH

$ gdb /home/gbullock/gcc48o/./gcc/xgcc

GNU gdb (GDB) 7.5

Copyright (C) 2012 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type show copying

and show warranty for details.

This GDB was configured as i686-pc-mingw32.

For bug reporting instructions, please see:

http://www.gnu.org/software/gdb/bugs/...

Reading symbols from

C:\MinGW\msys\1.0\home\gbullock\gcc48o\gcc\xgcc.exe...done.

(gdb) set args -B/home/gbullock/gcc48o/./gcc/

-L/home/gbullock/gcc48o/i686-pc-mingw32/winsup/mingw

-L/home/gbullock/gcc48o/i686-pc-mingw32/winsup/w32api/lib -isystem

/home/gbullock/gcc-4_8/winsup/mingw/include -isystem

/home/gbullock/gcc-4_8/winsup/w32api/include -B/usr/local/i686-pc-mingw32/bin/

-B/usr/local/i686-pc-mingw32/lib/ -isystem /usr/local/i686-pc-mingw32/include

-isystem /usr/local/i686-pc-mingw32/sys-include-g -O2 -O2

-I../../../gcc-4_8/libgcc/../winsup/w32api/include -g -O2 -DIN_GCC   -W -Wall

-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes

-Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g

-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -I. -I. -I../.././gcc

-I../../../gcc-4_8/libgcc -I../../../gcc-4_8/libgcc/.

-I../../../gcc-4_8/libgcc/../gcc -I../../../gcc-4_8/libgcc/../include

-I../../../gcc-4_8/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT

-DHAVE_CC_TLS -DUSE_EMUTLS -o bid128_fma.o -MT bid128_fma.o -MD -MP -MF

bid128_fma.dep -c ../../../gcc-4_8/libgcc/config/libbid/bid128_fma.c

(gdb) run

Starting program: C:\MinGW\msys\1.0\home\gbullock\gcc48o\gcc\xgcc.exe

-B/home/gbullock/gcc48o/./gcc/

-L/home/gbullock/gcc48o/i686-pc-mingw32/winsup/mingw

-L/home/gbullock/gcc48o/i686-pc-mingw32/winsup/w32api/lib -isystem

 /home/gbullock/gcc-4_8/winsup/mingw/include -isystem

/home/gbullock/gcc-4_8/winsup/w32api/include -B/usr/local/i686-pc-mingw32/bin/

-B/usr/local/i686-pc-mingw32/lib/ -isystem /usr/local/i686-pc-mingw32/include

-isystem

/usr/local/i686-pc-mingw32/sys-include-g -O2 -O2

-I../../../gcc-4_8/libgcc/../winsup/w32api/include -g -O2 -DIN_GCC   -W -Wall

-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes

-Wmissing-prototypes -Wold

-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc

-fno-stack-protector   -I. -I. -I../.././gcc -I../../../gcc-4_8/libgcc

-I../../../gcc-4_8/libgcc/. -I../../../gcc-4_8/libgcc/../gcc -I../../../gcc

-4_8/libgcc/../include 

[Bug fortran/57094] New: [Fortran-Dev] ICE: in lhd_incomplete_type_error, at langhooks.c:203

2013-04-27 Thread dominiq at lps dot ens.fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57094



 Bug #: 57094

   Summary: [Fortran-Dev] ICE: in lhd_incomplete_type_error, at

langhooks.c:203

Classification: Unclassified

   Product: gcc

   Version: fortran-dev

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: fortran

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: domi...@lps.ens.fr

CC: bur...@gcc.gnu.org

Blocks: 56818





When compiled with the fortran-dev branch, the tests

gfortran.dg/auto_char_len_3.f90, proc_decl_23.f90, and transfer_intrinsic_3.f90

give the same ICE:



[macbook] f90/bug% gfcd

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/auto_char_len_3.f90

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/auto_char_len_3.f90: In function

'teststringtools':

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/auto_char_len_3.f90:22:0: internal

compiler error: in lhd_incomplete_type_error, at langhooks.c:203

   txt = chararray2string(chararr)

[macbook] f90/bug% gfcd

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/proc_decl_23.f90

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/proc_decl_23.f90: In function

'MAIN__':

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/proc_decl_23.f90:36:0: internal

compiler error: in lhd_incomplete_type_error, at langhooks.c:203

   print *, string_to_char ([a,b,c])

[macbook] f90/bug% gfcd

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/transfer_intrinsic_3.f90

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/transfer_intrinsic_3.f90: In

function 'MAIN__':

/opt/gcc/for_work/gcc/testsuite/gfortran.dg/transfer_intrinsic_3.f90:34:0:

internal compiler error: in lhd_incomplete_type_error, at langhooks.c:203

 call has_key_ns(str_vs(qname(1:n-1)),, n)


[Bug fortran/57095] New: [Fortran-Dev] FAIL: gfortran.dg/alloc_comp_assign_[234].f90 -O* execution test

2013-04-27 Thread dominiq at lps dot ens.fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57095



 Bug #: 57095

   Summary: [Fortran-Dev] FAIL:

gfortran.dg/alloc_comp_assign_[234].f90  -O*

execution test

Classification: Unclassified

   Product: gcc

   Version: fortran-dev

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: fortran

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: domi...@lps.ens.fr

CC: bur...@gcc.gnu.org

Blocks: 56818





When compiled with the fortran-dev branch, the tests

gfortran.dg/alloc_comp_assign_[234].f90, pr43808.f90, and

realloc_on_assign_17.f90 fail at run time. Reduced tests:



  type :: a

integer, allocatable :: i(:)

  end type a



  type :: b

type (a), allocatable :: at(:)

  end type b



  type(a) :: x(2)

  type(b) :: y(2), z(2)

  integer i, m(4)



  x = (/a ((/1,2,3,4/)),a ((/5,6,7,8/))/)

  print *, x(1)%i, x(2)%i

  print *, after x

  y(1) = b ((/x(i)/))

  print *, after 2



end



fails at y(1) = b ((/x(i)/)), and



program allocate_assign

   implicit none

   type label

  integer, allocatable :: parts(:)

   end type label

   type table

  type(label), allocatable :: headers(:)

   end type table

   type(table) x1(2)

   integer i, j!, k

   x1 = [table([(label([(j,j=1,3)]),i=1,3)]), 

 table([(label([(j,j=1,4)]),i=1,4)])]

end program allocate_assign



fails at x1=... .


[Bug target/56716] during gcc 4.8.0 build on Cygwin: bid128_fma.c:4460:1: internal compiler error: Segmentation fault

2013-04-27 Thread aldot at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56716



Bernhard Reutner-Fischer aldot at gcc dot gnu.org changed:



   What|Removed |Added



 CC|aldot at gcc dot gnu.org|



--- Comment #9 from Bernhard Reutner-Fischer aldot at gcc dot gnu.org 
2013-04-27 22:35:02 UTC ---

b internal_error

run

bt


[Bug c++/57092] [4.8/4.9 Regression] Using decltype of function pointer type to define a data member causes compiler crash

2013-04-27 Thread daniel.kruegler at googlemail dot com

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57092

Daniel Krügler daniel.kruegler at googlemail dot com changed:

   What|Removed |Added

 CC||daniel.kruegler at
   ||googlemail dot com

--- Comment #2 from Daniel Krügler daniel.kruegler at googlemail dot com 
2013-04-27 22:40:20 UTC ---
A similar ICE occurs for gcc 4.9.0 20130421 (experimental):

main.cpp|3|internal compiler error: in finish_decltype_type, at
cp/semantics.c:5406|

[Bug libgcc/57085] Segmentation Fault when building a c file

2013-04-27 Thread synergye at codefi dot re


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57085



--- Comment #2 from synergye at codefi dot re 2013-04-27 22:48:45 UTC ---

Created attachment 29954

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29954

Affected code



Attached is contents.c that I mentioned in the initial post. This is from

system/extras/ext4_utils/ in jb-mr1.1-release of Android.


[Bug libfortran/56786] [4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces

2013-04-27 Thread jvdelisle at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56786



--- Comment #6 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2013-04-27 
22:51:47 UTC ---

I am in the process of back port to 4.8 along with Tilos patches for 52512 and

probably 51825.



I will do each separately so we can have a clear record.


[Bug libgcc/57085] Segmentation Fault when building a c file

2013-04-27 Thread synergye at codefi dot re


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57085



--- Comment #3 from synergye at codefi dot re 2013-04-27 22:54:43 UTC ---

(In reply to comment #1)

 Please attach _preprocessed_ source for the test case, and tell us what 
 options

 gcc was invoked when compiling the test case.



I've added the attachment of the affected code. The cflags used to build it are

as follows: -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=neon -fgcse-after-reload

-fipa-cp-clone -fpredictive-commoning -fsched-spec-load -funswitch-loops

-ftree-loop-distribution -ftree-loop-linear -fvect-cost-model

-fomit-frame-pointer -fstrict-aliasing -Wstrict-aliasing=3

-Werror=strict-aliasing -msoft-float -fpic -ffunction-sections -fdata-sections

-funwind-tables -fstack-protector -Wa,--noexecstack -Werror=format-security

-D_FORTIFY_SOURCE=1 -fno-short-enums -pipe.



This occurs at any optimization level.


[Bug fortran/57071] Optimize (-1)**k to 1 - 2 * mod(K, 2)

2013-04-27 Thread tkoenig at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57071



--- Comment #8 from Thomas Koenig tkoenig at gcc dot gnu.org 2013-04-27 
23:19:13 UTC ---

While special-casing power, it might also make sense

to translate 2**n to ishft(1,n).


[Bug target/56716] during gcc 4.8.0 build on Cygwin: bid128_fma.c:4460:1: internal compiler error: Segmentation fault

2013-04-27 Thread gccbugzi...@tru-traffic.com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56716



--- Comment #10 from Greg gccbugzi...@tru-traffic.com 2013-04-27 23:28:21 UTC 
---

(In reply to comment #9)

 b internal_error

 run

 bt



Alas, still no results.



gbullock@gbullock-W7 ~

$ cd /home/gbullock/gcc48o/i686-pc-mingw32/libgcc



gbullock@gbullock-W7 ~/gcc48o/i686-pc-mingw32/libgcc

$ export PATH=/home/gbullock/gcc48o/./gcc/:$PATH



gbullock@gbullock-W7 ~/gcc48o/i686-pc-mingw32/libgcc

$ gdb /home/gbullock/gcc48o/./gcc/xgcc

GNU gdb (GDB) 7.5

Copyright (C) 2012 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type show copying

and show warranty for details.

This GDB was configured as i686-pc-mingw32.

For bug reporting instructions, please see:

http://www.gnu.org/software/gdb/bugs/...

Reading symbols from

C:\MinGW\msys\1.0\home\gbullock\gcc48o\gcc\xgcc.exe...done.

fig/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_EMUTLS -o

bid128_fma.o -MT bid128_fma.o -MD -MP -MF bid128_fma.dep -c

../../../gcc-4_8/libgcc/config/libbid/bid128_fma.c

(gdb) b internal_error

Breakpoint 1 at 0x419592

(gdb) run

Starting program: C:\MinGW\msys\1.0\home\gbullock\gcc48o\gcc\xgcc.exe

-B/home/gbullock/gcc48o/./gcc/

-L/home/gbullock/gcc48o/i686-pc-mingw32/winsup/mingw

-L/home/gbullock/gcc48o/i686-pc-mingw32/winsup/w32api/lib -isystem

 /home/gbullock/gcc-4_8/winsup/mingw/include -isystem

/home/gbullock/gcc-4_8/winsup/w32api/include -B/usr/local/i686-pc-mingw32/bin/

-B/usr/local/i686-pc-mingw32/lib/ -isystem /usr/local/i686-pc-mingw32/include

-isystem

/usr/local/i686-pc-mingw32/sys-include-g -O2 -O2

-I../../../gcc-4_8/libgcc/../winsup/w32api/include -g -O2 -DIN_GCC   -W -Wall

-Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes

-Wmissing-prototypes -Wold

-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc

-fno-stack-protector   -I. -I. -I../.././gcc -I../../../gcc-4_8/libgcc

-I../../../gcc-4_8/libgcc/. -I../../../gcc-4_8/libgcc/../gcc -I../../../gcc

-4_8/libgcc/../include -I../../../gcc-4_8/libgcc/config/libbid

-DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_EMUTLS -o bid128_fma.o -MT

bid128_fma.o -MD -MP -MF bid128_fma.dep -c

../../../gcc-4_8/libgcc/config/libbid/b

id128_fma.c

[New Thread 4328.0x1c14]

../../../gcc-4_8/libgcc/config/libbid/bid128_fma.c:4460:1: internal compiler

error: Segmentation fault

 }

 ^

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

[Inferior 1 (process 4328) exited with code 01]

(gdb) bt

No stack.

(gdb)


[Bug c++/56958] Spurious set but not used variable warning in empty pack expansion

2013-04-27 Thread lucdanton at free dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56958



--- Comment #3 from lucdanton at free dot fr 2013-04-28 00:37:37 UTC ---

I do make use of the variable in the pack; that the pack may be empty for some

instantiations may or may not be something to look out for, but I don't think

that it should be done by the unused variable warning.



Perhaps I misunderstand the role of warning -- to me the 'used' in 'unused

variable' means that it's conceptually used, not that it's e.g. ODR-used or any

technical sense of the term. Should the following code warn? Who does that

benefit?



int spurious = 0

if(1) return 0;

// never reached -- is spurious used or not?

return spurious + 3;



Since GCC doesn't warn for this I thought it shouldn't in the case of the pack

expansion.


[Bug c++/57063] static_cast from data member to rvalue reference sometimes wrongfully produces lvalue

2013-04-27 Thread lucdanton at free dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57063



lucdanton at free dot fr changed:



   What|Removed |Added



 CC||lucdanton at free dot fr



--- Comment #5 from lucdanton at free dot fr 2013-04-28 02:56:42 UTC ---

In case it might help: in the past I reported

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49447 where it was assignments

which possibly had a wrong value category.


[Bug fortran/57096] New: Polymorphic allocatable variable is not behaved as expected

2013-04-27 Thread fgao7 at hotmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57096



 Bug #: 57096

   Summary: Polymorphic allocatable variable is not behaved as

expected

Classification: Unclassified

   Product: gcc

   Version: 4.7.2

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: fortran

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: fg...@hotmail.com





Created attachment 29955

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=29955

simple test program with Makefile



The global variable gA and gAp are allocatable and pointer of abstract derived

type A, respectively.



class(A), allocatable :: gA ! polymorphic allocatable variable

class(A), pointer :: gAp ! polymorphic pointer variable



They are allocated with the same type (A1 or A2) extends from type A and

intialized in the same way.



subroutine init(i) bind(c, name=init)

...

if(i == 1) then

allocate(A1::gA)

allocate(A1::gAp)

else

allocate(A2::gA)

allocate(A2::gAp)

end if

call gA%init()

call gAp%init()

...



then



subroutine run() bind(c, name=run)



print*, gA%next():, gA%next()

print*, gA%next():, gA%next()

print*, gA%next():, gA%next()

print*

print*, gAp%next():, gAp%next()

print*, gAp%next():, gAp%next()

print*, gAp%next():, gAp%next()

...



When they are called from a C++ program, however, they behave quitely

differently.





extern C {

extern void init(int i);

extern void run();

}



int main()

{

init(2);

run();

return 0;

}



The test program output is



% ./test

 gA%next():   0

 gA%next():   0

 gA%next():   0



 gAp%next():   2

 gAp%next():   4

 gAp%next():   6



where only the pointer version behaves as expected.


[Bug fortran/52512] Cannot match namelist object name

2013-04-27 Thread jvdelisle at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52512



--- Comment #8 from Jerry DeLisle jvdelisle at gcc dot gnu.org 2013-04-28 
03:24:29 UTC ---

Committed to support backport of fix to PR56786



Author: jvdelisle

Date: Sun Apr 28 02:59:44 2013

New Revision: 198366



URL: http://gcc.gnu.org/viewcvs?rev=198366root=gccview=rev

Log:

2013-04-27  Jerry DeLisle  jvdeli...@gcc.gnu.org



Backport from mainline:

2013-03-25  Tilo Schwarz  t...@tilo-schwarz.de



PR libfortran/52512

* io/list_read.c (nml_parse_qualifier): To check for a derived type

don't use the namelist head element type but the current element type.

(nml_get_obj_data): Add current namelist element type to

nml_parse_qualifier call.



PR fortran/52512

* gfortran.dg/namelist_79.f90: New test.



Added:

branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/namelist_79.f90

Modified:

branches/gcc-4_8-branch/gcc/testsuite/ChangeLog

branches/gcc-4_8-branch/libgfortran/ChangeLog

branches/gcc-4_8-branch/libgfortran/io/list_read.c