This file is indexed.

/usr/src/gcc-5/debian/patches/pr70218.diff is in gcc-5-source 5.3.1-14ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# DP: Fix PR c++/70218 (illegal access to private field succeeds)

gcc/cp/ChangeLog:

	PR c++/70218
	* parser.c (cp_parser_lambda_expression): Move call to
	pop_deferring_access_checks ahead of the call to
	cp_parser_end_tentative_firewall.

gcc/testsuite/ChangeLog:

	PR c++/70218
	* g++.dg/cpp0x/lambda/lambda-70218.C: New test.
---
 gcc/cp/parser.c                                  |  4 ++--
 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70218.C | 17 +++++++++++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70218.C

--- a/src/gcc/cp/parser.c
+++ b/src/gcc/cp/parser.c
@@ -9781,8 +9781,6 @@ cp_parser_lambda_expression (cp_parser* parser)
 	= auto_is_implicit_function_template_parm_p;
   }
 
-  pop_deferring_access_checks ();
-
   /* This field is only used during parsing of the lambda.  */
   LAMBDA_EXPR_THIS_CAPTURE (lambda_expr) = NULL_TREE;
 
@@ -9798,6 +9796,8 @@ cp_parser_lambda_expression (cp_parser* parser)
 
   cp_parser_end_tentative_firewall (parser, start, lambda_expr);
 
+  pop_deferring_access_checks ();
+
   return lambda_expr;
 }
 
--- /dev/null
+++ b/src/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70218.C
@@ -0,0 +1,17 @@
+// PR c++/70218
+// { dg-do compile { target c++11 } }
+
+struct X {
+private:
+   int i;
+};
+
+struct Y {
+  Y (int) { }
+};
+
+void
+foo ()
+{
+  Y ([] { X x; x.i = 3; return 0; } ()); // { dg-error "private" }
+}